update to latest zig

This commit is contained in:
Nathan McRae 2025-01-14 20:42:51 -08:00
parent d8fec2b4ea
commit fb45fe256f

View File

@ -24,10 +24,7 @@ pub fn main() !void {
defer c.SDL_DestroyRenderer(renderer); defer c.SDL_DestroyRenderer(renderer);
const zig_bmp = @embedFile("zig.bmp"); const zig_bmp = @embedFile("zig.bmp");
const rw = c.SDL_RWFromConstMem( const rw = c.SDL_RWFromConstMem(zig_bmp, zig_bmp.len) orelse {
@ptrCast(*const c_void, &zig_bmp[0]),
@intCast(c_int, zig_bmp.len),
) orelse {
c.SDL_Log("Unable to get RWFromConstMem: %s", c.SDL_GetError()); c.SDL_Log("Unable to get RWFromConstMem: %s", c.SDL_GetError());
return error.SDLInitializationFailed; return error.SDLInitializationFailed;
}; };