From 3dd61f423ad6c79f319388625f2223d0e46a2f16 Mon Sep 17 00:00:00 2001 From: belugas Date: Tue, 1 Jan 2008 14:20:48 +0000 Subject: (svn r11734) -Change: Allow ToggleFullScreen to return the result of the operation' attempt. Previously, only visual clues were available. -Fix[FS#1519]: When you can not use this resolution at full screen, now you'll know that it failed. As for the reason it did not work, each computer/OS has its reason. --- src/video/cocoa/cocoa_v.h | 2 +- src/video/cocoa/cocoa_v.mm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/video/cocoa') diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index 3a7276bb2..10c408f0a 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -19,7 +19,7 @@ public: /* virtual */ bool ChangeResolution(int w, int h); - /* virtual */ void ToggleFullscreen(bool fullscreen); + /* virtual */ bool ToggleFullscreen(bool fullscreen); }; class FVideoDriver_Cocoa: public VideoDriverFactory { diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 3ca9f8113..2a5eea7be 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -361,7 +361,7 @@ bool VideoDriver_Cocoa::ChangeResolution(int w, int h) return ret; } -void VideoDriver_Cocoa::ToggleFullscreen(bool full_screen) +bool VideoDriver_Cocoa::ToggleFullscreen(bool full_screen) { bool oldfs; @@ -386,6 +386,7 @@ void VideoDriver_Cocoa::ToggleFullscreen(bool full_screen) QZ_GameSizeChanged(); QZ_UpdateVideoModes(); + return _cocoa_subdriver->IsFullscreen() == full_screen; } -- cgit v1.2.3-70-g09d2