Sfoglia il codice sorgente

Make the GTK editor more responsive.

legacy
Sam Hocevar sam 15 anni fa
parent
commit
601ce07746
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      src/gtk/editor.cpp

+ 3
- 3
src/gtk/editor.cpp Vedi File

@@ -156,9 +156,9 @@ int main(int argc, char **argv)
new Game("maps/testmap.tmx"); new Game("maps/testmap.tmx");
new DebugFps(); 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(); gtk_main();


return EXIT_SUCCESS; return EXIT_SUCCESS;


Caricamento…
Annulla
Salva