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

@@ -329,7 +329,7 @@ static uint32 ConvertAllegroKeyIntoMy(WChar *character)
static const uint LEFT_BUTTON = 0;
static const uint RIGHT_BUTTON = 1;
static void PollEvent()
bool VideoDriver_Allegro::PollEvent()
{
poll_mouse();
@@ -403,6 +403,8 @@ static void PollEvent()
uint keycode = ConvertAllegroKeyIntoMy(&character);
HandleKeypress(keycode, character);
}
return false;
}
/**
@@ -482,7 +484,6 @@ void VideoDriver_Allegro::MainLoop()
for (;;) {
InteractiveRandom(); // randomness
PollEvent();
if (_exit_game) return;
if (this->Tick()) {