mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
video: Handle Cocoa desktop mode switch inhibition in the video layer
The X backend had the same issue, so both Cocoa and X can be handled in the same location.
This commit is contained in:
@@ -1435,7 +1435,7 @@ void SDL_SetDesktopDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode
|
||||
{
|
||||
SDL_DisplayMode last_mode;
|
||||
|
||||
if (display->fullscreen_window) {
|
||||
if (display->fullscreen_window || display->device->setting_display_mode) {
|
||||
// This is a temporary mode change, don't save the desktop mode
|
||||
return;
|
||||
}
|
||||
|
@@ -433,7 +433,7 @@ static void Cocoa_DisplayReconfigurationCallback(CGDirectDisplayID displayid, CG
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags & kCGDisplaySetModeFlag) && !_this->setting_display_mode) {
|
||||
if (flags & kCGDisplaySetModeFlag) {
|
||||
if (display) {
|
||||
CGDisplayModeRef moderef = CGDisplayCopyDisplayMode(displayid);
|
||||
if (moderef) {
|
||||
|
Reference in New Issue
Block a user