From: Holger Schemel Date: Wed, 9 Mar 2016 20:56:07 +0000 (+0100) Subject: fixed graphical responsiveness of gadgets (mainly in editor) X-Git-Tag: 4.0.0.0-rc1~51 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b4e74fe434deee25bf99f6d44376d6ae06b7c832;p=rocksndiamonds.git fixed graphical responsiveness of gadgets (mainly in editor) --- diff --git a/src/events.c b/src/events.c index 1afc85d6..7a03f33f 100644 --- a/src/events.c +++ b/src/events.c @@ -208,6 +208,9 @@ void EventLoop(void) HandleOtherEvents(&event); break; } + + if (DelayReached(&sync_frame_delay, sync_frame_delay_value)) + BackToFront(); } } else diff --git a/src/libgame/gadgets.c b/src/libgame/gadgets.c index 9ff99690..6200c9dc 100644 --- a/src/libgame/gadgets.c +++ b/src/libgame/gadgets.c @@ -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,