From 885b15a71f9bbdc276afa0adeafc68470674591d Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sun, 5 Jul 2020 00:20:20 +0200 Subject: [PATCH] Removed variable during SDL initialization --- src/main.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3456cf79..d30caf85 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1015,22 +1015,23 @@ void check_error_sdl(const bool check, const char* message) static int real_main2(int argc, TCHAR** argv) { + if ( #ifdef USE_DISPMANX - int ret = SDL_Init(SDL_INIT_TIMER - | SDL_INIT_AUDIO - | SDL_INIT_JOYSTICK - | SDL_INIT_HAPTIC - | SDL_INIT_GAMECONTROLLER - | SDL_INIT_EVENTS) != 0; + SDL_Init(SDL_INIT_TIMER + | SDL_INIT_AUDIO + | SDL_INIT_JOYSTICK + | SDL_INIT_HAPTIC + | SDL_INIT_GAMECONTROLLER + | SDL_INIT_EVENTS) != 0 #else - const int ret = SDL_Init(SDL_INIT_EVERYTHING) != 0; + SDL_Init(SDL_INIT_EVERYTHING) != 0 #endif - if (ret < 0) + ) { printf("SDL could not initialize! SDL_Error: %s\n", SDL_GetError()); abort(); } - + keyboard_settrans(); set_config_changed(); if (restart_config[0])