wrap pollEvent() to guarantee all loops handle modifiers (#477)
This commit is contained in:
@@ -214,7 +214,7 @@ void handle_events() {
|
||||
menuChoiceId=-1;
|
||||
}
|
||||
#endif
|
||||
while(mainPtr.pollEvent(currentEvent)) handle_one_event(currentEvent);
|
||||
while(pollEvent(mainPtr, currentEvent)) handle_one_event(currentEvent);
|
||||
|
||||
redraw_everything();
|
||||
|
||||
@@ -225,9 +225,6 @@ void handle_events() {
|
||||
|
||||
void handle_one_event (const sf::Event& event) {
|
||||
|
||||
// If it's just a modifier key, update the state
|
||||
if(kb.handleModifier(event)) return;
|
||||
|
||||
// Check if the menubar wants to handle this event.
|
||||
if(menuBarProcessEvent(event)) return;
|
||||
|
||||
|
Reference in New Issue
Block a user