From 919469ebd185e8a38738b358131789c012802c24 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 9 May 2023 00:12:10 +0100 Subject: Explicit init --- tr8vm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tr8vm.c') 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, -- cgit v1.2.3