[Scummvm-git-logs] scummvm master -> 03b227fdf010122de42f4e0badb2041438236030
eriktorbjorn
eriktorbjorn at telia.com
Tue Nov 9 08:45:51 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
03b227fdf0 BACKENDS: DIALOGS: GTK: Keep ScummVM mouse pointer alive during dialog
Commit: 03b227fdf010122de42f4e0badb2041438236030
https://github.com/scummvm/scummvm/commit/03b227fdf010122de42f4e0badb2041438236030
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-11-09T09:45:36+01:00
Commit Message:
BACKENDS: DIALOGS: GTK: Keep ScummVM mouse pointer alive during dialog
Also, throttle the rate at which updateScreen() is called. I don't know
if it makes any difference, but it seems like a polite thing to do.
Changed paths:
backends/dialogs/gtk/gtk-dialogs.cpp
diff --git a/backends/dialogs/gtk/gtk-dialogs.cpp b/backends/dialogs/gtk/gtk-dialogs.cpp
index a1602a5692..18a0609000 100644
--- a/backends/dialogs/gtk/gtk-dialogs.cpp
+++ b/backends/dialogs/gtk/gtk-dialogs.cpp
@@ -30,6 +30,7 @@
#include "backends/dialogs/gtk/gtk-dialogs.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/translation.h"
#include <gtk/gtk.h>
@@ -38,9 +39,16 @@
// this might not necessarily work properly with all compilers.
static gboolean _inDialog;
+static uint32 _lastUpdateTick = 0;
static gboolean idleCallback(gpointer data) {
- g_system->updateScreen();
+ uint32 currentTick = g_system->getMillis();
+ if (g_system->getMillis() - _lastUpdateTick > 10) {
+ Common::Event dummy;
+ while (g_system->getEventManager()->pollEvent(dummy)) {}
+ g_system->updateScreen();
+ _lastUpdateTick = currentTick;
+ }
return _inDialog;
}
More information about the Scummvm-git-logs
mailing list