commit 7f1a620

chld  ·  2026-10-27 23:43:38 +0000 UTC
parent d0acf5f
fix polling and input, efficient redrawing
5 files changed,  +10, -11
M uxn.c
M uxn.o
+2, -8
 1@@ -6,16 +6,10 @@ GXX = nspire-g++
 2 LD  = nspire-ld
 3 GENZEHN = genzehn
 4 
 5-GCCFLAGS = -Wall -W -marm -Wno-int-conversion
 6-LDFLAGS = -lSDL
 7+GCCFLAGS = -Wall -W -marm -Wno-int-conversion -Os
 8+LDFLAGS = -lSDL -Wl,-Os
 9 ZEHNFLAGS = --name "uxn39"
10 
11-ifeq ($(DEBUG),FALSE)
12-	GCCFLAGS += -Os
13-else
14-	GCCFLAGS += -O0 -g
15-endif
16-
17 OBJS = $(patsubst %.c, %.o, $(shell find . -name \*.c))
18 OBJS += $(patsubst %.cpp, %.o, $(shell find . -name \*.cpp))
19 OBJS += $(patsubst %.S, %.o, $(shell find . -name \*.S))
M uxn.c
+8, -3
 1@@ -1323,10 +1323,15 @@ static int run_screen(void) {
 2         }
 3         break;
 4     }
 5-    if(picture_changed) redraw();
 6   }
 7-  return 0;
 8-    }}
 9+  if(picture_changed) {
10+    redraw();
11+    picture_changed=0;
12+  }
13+  SDL_Delay(1);
14+    }
15+    return 0;
16+}
17 
18 int main(int argc, char **argv)
19 {
M uxn.o
+0, -0
+0, -0
+0, -0