diff options
author | belugas <belugas@openttd.org> | 2008-01-01 14:20:48 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2008-01-01 14:20:48 +0000 |
commit | 3dd61f423ad6c79f319388625f2223d0e46a2f16 (patch) | |
tree | 4649001ed8ff619fb2275a558ad17a1e8a942a9c /src/settings_gui.cpp | |
parent | a8611311ac842618f0be9e20b8339e7adbf86738 (diff) | |
download | openttd-3dd61f423ad6c79f319388625f2223d0e46a2f16.tar.xz |
(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.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r-- | src/settings_gui.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 3dc5a4226..ea686f9ef 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -201,8 +201,11 @@ static void GameOptionsWndProc(Window *w, WindowEvent *e) ShowDropDownMenu(w, BuildDynamicDropdown(SPECSTR_RESOLUTION_START, _num_resolutions), GetCurRes(), 27, 0, 0); return; case 28: /* Click fullscreen on/off */ - w->SetWidgetLoweredState(28, !_fullscreen); - ToggleFullScreen(!_fullscreen); // toggle full-screen on/off + /* try to toggle full-screen on/off */ + if (!ToggleFullScreen(!_fullscreen)) { + ShowErrorMessage(INVALID_STRING_ID, STR_FULLSCREEN_FAILED, 0, 0); + } + w->SetWidgetLoweredState(28, _fullscreen); SetWindowDirty(w); return; case 30: case 31: /* Setup screenshot format dropdown */ |