(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.
This commit is contained in:
@@ -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<FVideoDriver_Cocoa> {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user