SDL: Fix Missing Default Switch Cases in Events Class

These are flagged by GCC if -Wswitch-default is enabled.
This commit is contained in:
D G Turner 2019-10-16 23:24:05 +01:00
parent 32a6f0b376
commit 690370554f

View File

@ -668,6 +668,8 @@ bool SdlEventSource::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_QUIT;
return true;
default:
break;
}
if (_joystick) {
@ -680,6 +682,8 @@ bool SdlEventSource::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) {
return handleJoyAxisMotion(ev, event);
case SDL_JOYHATMOTION:
return handleJoyHatMotion(ev, event);
default:
break;
}
}
@ -692,6 +696,8 @@ bool SdlEventSource::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) {
return handleControllerButton(ev, event, true);
case SDL_CONTROLLERAXISMOTION:
return handleControllerAxisMotion(ev, event);
default:
break;
}
}
#endif
@ -979,6 +985,8 @@ bool SdlEventSource::handleJoyButtonDown(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_VIRTUAL_KEYBOARD;
break;
#endif
default:
break;
}
return true;
}
@ -1021,6 +1029,8 @@ bool SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
// Handled in key down
break;
#endif
default:
break;
}
return true;
}