Fix quitting via Command-Q on macOS
This commit is contained in:
parent
2354a0a640
commit
fe26098c2b
1 changed files with 6 additions and 0 deletions
|
|
@ -91,6 +91,12 @@ void SdlGamepadKeyNavigation::onPollingTimerFired()
|
||||||
|
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
switch (event.type) {
|
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_CONTROLLERBUTTONDOWN:
|
||||||
case SDL_CONTROLLERBUTTONUP:
|
case SDL_CONTROLLERBUTTONUP:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue