| Summary: | On OSX, an SDL app prevents system shutdown. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Tim McDaniel <tmcdaniel> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.1 | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS X (All) | ||
| Attachments: | Patch | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/05cbb1cb4f27 |
Created attachment 1520 [details] Patch On OSX, an SDL app forces a system shutdown to be cancelled. This happens because [SDLAppDelegate applicationShouldTerminate] returns NSTerminateCancel. A better approach is to subclass NSApplication and override terminate to do nothing except call SDL_SendQuit. In response to a system shutdown notification, this allows the normal SDL Quit event processing to occur, and if the app then terminates, system shutdown occurs normally. Please see the attached patch, based on SDL 2.0.1.