From 601ce07746449ab68df22e14739791b24fc10c75 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 15 Aug 2010 16:56:09 +0000 Subject: [PATCH] Make the GTK editor more responsive. --- src/gtk/editor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gtk/editor.cpp b/src/gtk/editor.cpp index d3d08463..3594d7f4 100644 --- a/src/gtk/editor.cpp +++ b/src/gtk/editor.cpp @@ -156,9 +156,9 @@ int main(int argc, char **argv) new Game("maps/testmap.tmx"); new DebugFps(); - //gtk_idle_add(tick, glarea); - gtk_timeout_add(1000 / FPS, tick, glarea); - + /* We tick from the idle function instead of a timeout to avoid + * stealing time from the GTK loop. */ + gtk_idle_add(tick, glarea); gtk_main(); return EXIT_SUCCESS;