mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-02 16:22:36 +02:00
hiro/gtk: Remove pendingEvents here too.
Now that pApplication::pendingEvents() has been removed from hiro/core, it should be removed from the GTK+ backend too.
This commit is contained in:
@@ -34,16 +34,12 @@ auto pApplication::run() -> void {
|
||||
}
|
||||
}
|
||||
|
||||
auto pApplication::pendingEvents() -> bool {
|
||||
return gtk_events_pending();
|
||||
}
|
||||
|
||||
auto pApplication::processEvents() -> void {
|
||||
//GTK can sometimes return gtk_pending_events() == true forever,
|
||||
//no matter how many times gtk_main_iteration_do() is called.
|
||||
//implement a timeout to prevent hiro from hanging forever in this case.
|
||||
auto time = chrono::millisecond();
|
||||
while(pendingEvents() && chrono::millisecond() - time < 50) {
|
||||
while(gtk_events_pending() && chrono::millisecond() - time < 50) {
|
||||
gtk_main_iteration_do(false);
|
||||
}
|
||||
for(auto& window : state().windows) window->_synchronizeGeometry();
|
||||
|
@@ -6,7 +6,6 @@ struct pApplication {
|
||||
static auto exit() -> void;
|
||||
static auto modal() -> bool;
|
||||
static auto run() -> void;
|
||||
static auto pendingEvents() -> bool;
|
||||
static auto processEvents() -> void;
|
||||
static auto quit() -> void;
|
||||
static auto setScreenSaver(bool screenSaver) -> void;
|
||||
|
Reference in New Issue
Block a user