Fix compilation error when calling runGraphics
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kayomn 2022-10-04 14:20:32 +01:00
parent d6fad7288d
commit 95f48b28c7
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ const sys = @import("./sys.zig");
/// Entry point. /// Entry point.
/// ///
pub fn main() anyerror!void { pub fn main() anyerror!void {
return sys.runGraphics(anyerror, run); return nosuspend sys.runGraphics(anyerror, run);
} }
test { test {

View File

@ -616,13 +616,13 @@ pub const GraphicsContext = opaque {
/// ///
/// ///
pub fn GraphicsRunner(comptime Errors: type) type { pub fn GraphicsRunner(comptime Errors: type) type {
return fn (*EventLoop, *GraphicsContext) Errors!void; return fn (*EventLoop, *GraphicsContext) callconv(.Async) Errors!void;
} }
/// ///
/// ///
/// ///
pub fn runGraphics(comptime Errors: anytype, run: GraphicsRunner(Errors)) Errors!void { pub fn runGraphics(comptime Errors: anytype, comptime run: GraphicsRunner(Errors)) Errors!void {
if (ext.SDL_Init(ext.SDL_INIT_EVERYTHING) != 0) { if (ext.SDL_Init(ext.SDL_INIT_EVERYTHING) != 0) {
ext.SDL_LogCritical(ext.SDL_LOG_CATEGORY_APPLICATION, "Failed to initialize runtime"); ext.SDL_LogCritical(ext.SDL_LOG_CATEGORY_APPLICATION, "Failed to initialize runtime");