Codechange: [Video] make the prototype of PollEvent() the same for all drivers
Additionally, call it from the draw-tick.
This commit is contained in:

committed by
Patric Stout

parent
70e4845915
commit
c409f45ddd
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user