mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
SDL: Allow joystick init to fail
It's not critical so can be skipped
This commit is contained in:
1 parent
8a77ad45c3
commit
3a3da1b41e
1 file changed
+4
-2
@@ -81,12 +81,14 @@ SdlEventSource::SdlEventSource()
|
||||
if (joystick_num >= 0) {
|
||||
// Initialize SDL joystick subsystem
|
||||
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1) {
|
||||
error("Could not initialize SDL: %s", SDL_GetError());
|
||||
warning("Could not initialize SDL joystick: %s", SDL_GetError());
|
||||
return;
|
||||
}
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) == -1) {
|
||||
error("Could not initialize SDL: %s", SDL_GetError());
|
||||
warning("Could not initialize SDL game controller: %s", SDL_GetError());
|
||||
return;
|
||||
}
|
||||
loadGameControllerMappingFile();
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user