summaryrefslogtreecommitdiff
path: root/src/video/win32_v.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-02-20 10:30:50 +0100
committerPatric Stout <github@truebrain.nl>2021-02-20 14:25:56 +0100
commit08821f82b60e535b2ba95a97361a8cb4dd085e98 (patch)
treef63761f97b81ca25072ddabbbbfe519581af0537 /src/video/win32_v.cpp
parent19fdbac287374468f221d3d79aa9344314e62ade (diff)
downloadopenttd-08821f82b60e535b2ba95a97361a8cb4dd085e98.tar.xz
Fix: [Win32] run InteractiveRandom() once every tick, not once every message
Win32 was the only video driver doing this. It is just a bit too much random.
Diffstat (limited to 'src/video/win32_v.cpp')
-rw-r--r--src/video/win32_v.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index e758f38e7..f3ae911b7 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -1165,8 +1165,9 @@ void VideoDriver_Win32::MainLoop()
CheckPaletteAnim();
for (;;) {
+ InteractiveRandom(); // randomness
+
while (PeekMessage(&mesg, nullptr, 0, 0, PM_REMOVE)) {
- InteractiveRandom(); // randomness
/* Convert key messages to char messages if we want text input. */
if (EditBoxInGlobalFocus()) TranslateMessage(&mesg);
DispatchMessage(&mesg);