summaryrefslogtreecommitdiff
path: root/src/video/cocoa
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-02-24 14:45:10 +0100
committerPatric Stout <github@truebrain.nl>2021-02-24 21:58:47 +0100
commitc409f45ddd12bbd399dcda4a33043ce261da4dc4 (patch)
tree78d378284cd09d6faf6679c3471c89f64a46bf7b /src/video/cocoa
parent70e484591579640b05727e189cfe70ba7d2b4e51 (diff)
downloadopenttd-c409f45ddd12bbd399dcda4a33043ce261da4dc4.tar.xz
Codechange: [Video] make the prototype of PollEvent() the same for all drivers
Additionally, call it from the draw-tick.
Diffstat (limited to 'src/video/cocoa')
-rw-r--r--src/video/cocoa/cocoa_v.h3
-rw-r--r--src/video/cocoa/cocoa_v.mm2
2 files changed, 1 insertions, 4 deletions
diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h
index c1a645245..d95d7bf98 100644
--- a/src/video/cocoa/cocoa_v.h
+++ b/src/video/cocoa/cocoa_v.h
@@ -62,6 +62,7 @@ protected:
void InputLoop() override;
bool LockVideoBuffer() override;
void UnlockVideoBuffer() override;
+ bool PollEvent() override;
void GameSizeChanged();
@@ -79,8 +80,6 @@ protected:
virtual void ReleaseVideoPointer() {}
private:
- bool PollEvent();
-
bool IsFullscreen();
};
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm
index bd8340ec1..febeae2d5 100644
--- a/src/video/cocoa/cocoa_v.mm
+++ b/src/video/cocoa/cocoa_v.mm
@@ -440,8 +440,6 @@ void VideoDriver_Cocoa::GameLoop()
InteractiveRandom(); // randomness
- while (this->PollEvent()) {}
-
if (_exit_game) {
/* Restore saved resolution if in fullscreen mode. */
if (this->IsFullscreen()) _cur_resolution = this->orig_res;