fixed graphical responsiveness of gadgets (mainly in editor)
authorHolger Schemel <info@artsoft.org>
Wed, 9 Mar 2016 20:56:07 +0000 (21:56 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 9 Mar 2016 21:10:02 +0000 (22:10 +0100)
src/events.c
src/libgame/gadgets.c

index 1afc85d65810bad65fe4cc07c31d36f648438b40..7a03f33ffd88cb2f6be5d0e7dad8332332ecc55f 100644 (file)
@@ -208,6 +208,9 @@ void EventLoop(void)
            HandleOtherEvents(&event);
            break;
        }
+
+       if (DelayReached(&sync_frame_delay, sync_frame_delay_value))
+         BackToFront();
       }
     }
     else
index 9ff99690e96a1f3438a9cc1b4dca79747beb6a0b..6200c9dc3da22291d19e086f1c5acdf99685e4d4 100644 (file)
@@ -704,6 +704,10 @@ static void DrawGadget(struct GadgetInfo *gi, boolean pressed, boolean direct)
       return;
   }
 
+  // do not use direct gadget drawing anymore; this worked as a speed-up once,
+  // but would slow things down a lot now the screen is always fully redrawn
+  direct = FALSE;
+
   if (direct)
   {
     BlitBitmap(drawto, window,