aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-09 00:12:10 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-09 00:12:10 +0100
commit919469ebd185e8a38738b358131789c012802c24 (patch)
treedd1000aa7674c98f943dba8389488873fdea049c
parentbc0c541c96d06b252684bc90166602248da6f376 (diff)
downloadtr8vm-919469ebd185e8a38738b358131789c012802c24.tar.gz
tr8vm-919469ebd185e8a38738b358131789c012802c24.zip
Explicit init
-rw-r--r--tr8vm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tr8vm.c b/tr8vm.c
index db13af2..57740d9 100644
--- a/tr8vm.c
+++ b/tr8vm.c
@@ -231,6 +231,12 @@ int main(int argc, char *argv[])
}
fclose(fd);
+ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_GAMECONTROLLER))
+ {
+ fprintf(stderr, "Failed init: %s\n", SDL_GetError());
+ return 1;
+ }
+
SDL_Window *screen = SDL_CreateWindow(APP_NAME " " APP_VERSION,
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
WINDOW_W, WINDOW_H,