diff options
author | andrigamerita <37557992+andrigamerita@users.noreply.github.com> | 2021-12-01 13:52:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 13:52:58 +0100 |
commit | 151610eb6c0ec89e3947f0d85796e27c5868903e (patch) | |
tree | a67ab609992f092bb734bd22abac4e92df51a2e2 /src/frontend/qt_sdl/main.cpp | |
parent | 3300cc8f15c73d2d142656d6634cfab33946189a (diff) |
Treat SDL_INIT_JOYSTICK fail as non-critical (#1277)
Treating the fail of SDL_INIT_JOYSTICK as non-critical, because on some systems that SDL feature can for some reason fail. This leads to the emulator closing with a critical error, even though it would work perfectly fine with just a keyboard.
Diffstat (limited to 'src/frontend/qt_sdl/main.cpp')
-rw-r--r-- | src/frontend/qt_sdl/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 64a0a90..0447cbb 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -2797,7 +2797,11 @@ int main(int argc, char** argv) { printf("SDL couldn't init rumble\n"); } - if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0) + if (SDL_Init(SDL_INIT_JOYSTICK) < 0) + { + printf("SDL couldn't init joystick\n"); + } + if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) { QMessageBox::critical(NULL, "melonDS", "SDL shat itself :("); return 1; |