Fix quitting via Command-Q on macOS

This commit is contained in:
Cameron Gutman 2019-04-06 15:22:14 -07:00
parent 2354a0a640
commit fe26098c2b

View file

@ -91,6 +91,12 @@ void SdlGamepadKeyNavigation::onPollingTimerFired()
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_QUIT:
// SDL may send us a quit event since we initialize
// the video subsystem on startup. If we get one,
// forward it on for Qt to take care of.
QCoreApplication::instance()->quit();
break;
case SDL_CONTROLLERBUTTONDOWN:
case SDL_CONTROLLERBUTTONUP:
{