summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-03-08 16:57:59 +0100
committerGitHub <noreply@github.com>2021-03-08 16:57:59 +0100
commit04db99749b6cb81f5df92e80fe0e731cb1eb9f12 (patch)
tree50a44241a9c937da96db04991bdf76f9bd5ece99 /src/video/win32_v.cpp
parentd3179709b1c848dfad61540cbea3db7ed8deb5fb (diff)
downloadopenttd-04db99749b6cb81f5df92e80fe0e731cb1eb9f12.tar.xz
Fix #8784: using alt+enter didn't update the fullscreen toggle visibly (#8820)
Basically, the window was not invalidated, so it was never redrawn. This made it look like it wasn't working, but it really was.
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index ae1f5aafa..30729ead6 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -967,7 +967,10 @@ bool VideoDriver_Win32Base::ToggleFullscreen(bool full_screen)
std::unique_lock<std::recursive_mutex> lock;
if (this->draw_mutex != nullptr) lock = std::unique_lock<std::recursive_mutex>(*this->draw_mutex);
- return this->MakeWindow(full_screen);
+ bool res = this->MakeWindow(full_screen);
+
+ InvalidateWindowClassesData(WC_GAME_OPTIONS, 3);
+ return res;
}
void VideoDriver_Win32Base::AcquireBlitterLock()