aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutumn! <autumnull@posteo.net>2023-01-23 23:21:59 +0000
committerDrew DeVault <sir@cmpwn.com>2023-03-16 09:55:51 +0100
commit467c800413ee22a6d7309ef4e92c92ff36679cc5 (patch)
treebb7f096e42f9cc1cb8af82aed28d924ea7a9eee8
parentadd SDL_(Un)LockTexture (diff)
downloadhare-chip8-467c800413ee22a6d7309ef4e92c92ff36679cc5.tar.gz
Swap io::{read,write}items for io::{read,write}all
Signed-off-by: Autumn! <autumnull@posteo.net>
-rw-r--r--sdl2/rwops.ha4
1 files changed, 2 insertions, 2 deletions
diff --git a/sdl2/rwops.ha b/sdl2/rwops.ha
index d497750..ec961a2 100644
--- a/sdl2/rwops.ha
+++ b/sdl2/rwops.ha
@@ -103,7 +103,7 @@ fn stream_seek(ctx: *SDL_RWops, offs: i64, whence: int) i64 = {
fn stream_read(ctx: *SDL_RWops, ptr: *void, sz: size, maxnum: size) size = {
const handle = *(&ctx.hidden.unknown.data1: *io::handle);
let buf = ptr: *[*]u8;
- match (io::readitems(handle, buf[..sz * maxnum], sz)) {
+ match (io::readall(handle, buf[..sz * maxnum])) {
case let n: size =>
return n;
case io::error =>
@@ -114,7 +114,7 @@ fn stream_read(ctx: *SDL_RWops, ptr: *void, sz: size, maxnum: size) size = {
fn stream_write(ctx: *SDL_RWops, ptr: *void, sz: size, num: size) size = {
const handle = *(&ctx.hidden.unknown.data1: *io::handle);
let buf = ptr: *[*]u8;
- match (io::writeitems(handle, buf[..sz * num], sz)) {
+ match (io::writeall(handle, buf[..sz * num])) {
case let n: size =>
return n;
case io::error =>