Codechange: [Video] make the prototype of PollEvent() the same for all drivers

Additionally, call it from the draw-tick.
This commit is contained in:
Patric Stout
2021-02-24 14:45:10 +01:00
committed by Patric Stout
parent 70e4845915
commit c409f45ddd
12 changed files with 36 additions and 23 deletions

View File

@@ -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();
};

View File

@@ -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;