Compare commits
3 Commits
38211718e3
...
95f48b28c7
Author | SHA1 | Date |
---|---|---|
kayomn | 95f48b28c7 | |
kayomn | d6fad7288d | |
kayomn | 28e61f846a |
|
@ -23,7 +23,7 @@
|
|||
},
|
||||
|
||||
"problemMatcher": {
|
||||
"source": "gcc",
|
||||
"source": "zig",
|
||||
"owner": "cpptools",
|
||||
|
||||
"fileLocation": [
|
||||
|
|
|
@ -11,7 +11,7 @@ const sys = @import("./sys.zig");
|
|||
/// Entry point.
|
||||
///
|
||||
pub fn main() anyerror!void {
|
||||
return sys.runGraphics(anyerror, run);
|
||||
return nosuspend sys.runGraphics(anyerror, run);
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
|
@ -108,8 +108,8 @@ pub const EventLoop = opaque {
|
|||
{
|
||||
var status = @as(c_int, 0);
|
||||
|
||||
// SDL2 defines waiting on a null thread reference as a no-op.
|
||||
// https://wiki.libsdl.org/SDL_WaitThread
|
||||
// SDL2 defines waiting on a null thread reference as a no-op. See
|
||||
// https://wiki.libsdl.org/SDL_WaitThread for more information
|
||||
ext.SDL_WaitThread(implementation.file_system_thread, &status);
|
||||
|
||||
if (status != 0) {
|
||||
|
@ -616,13 +616,13 @@ pub const GraphicsContext = opaque {
|
|||
///
|
||||
///
|
||||
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) {
|
||||
ext.SDL_LogCritical(ext.SDL_LOG_CATEGORY_APPLICATION, "Failed to initialize runtime");
|
||||
|
||||
|
|
Loading…
Reference in New Issue