From cf37fc31c6ef9a4ed01b6b9b642b858d2b7965eb Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi

Date: Fri, 4 Feb 2022 15:15:15 +0200

Subject: [PATCH 1/1] App: Event processing tweak

Refresh events will never be dispatched (it would be pointless), but instead just set a flag that prevents SDL_WaitEvent() to be called.

SDL_WaitEvent() should never be called anyway because pendingRefresh is set, but this makes it clearer and skips other unnecessary checks.


src/app.c | 7 ++++++-

1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/app.c b/src/app.c

index 9f35d727..3e6e9cdc 100644

--- a/src/app.c

+++ b/src/app.c

@@ -1291,9 +1291,10 @@ void processEvents_App(enum iAppEventMode eventMode) {

 iRoot *oldCurrentRoot = current_Root(); /* restored afterwards */

 SDL_Event ev;

 iBool gotEvents = iFalse;

 iPtrArray windows;

 init_PtrArray(&windows);

#if defined (iPlatformAppleMobile)

     if (processEvent_iOS(&ev)) {

         continue;

@@ -1364,6 +1365,10 @@ void processEvents_App(enum iAppEventMode eventMode) {

                 dispatchCommands_Periodic(&d->periodic);

                 continue;

             }

#if defined (LAGRANGE_ENABLE_IDLE_SLEEP)

             if (ev.type == SDL_USEREVENT && ev.user.code == asleep_UserEventCode) {

                 if (SDL_GetTicks() - d->lastEventTime > idleThreshold_App_ &&

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/release/patch/cf37fc31c6ef9a4ed01b6b9b642b858d2b7965eb.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
33.799454 milliseconds
Gemini-to-HTML Time
0.855506 milliseconds

This content has been proxied by September (ba2dc).