From 264e1336eb8e3dae7f9ea72737f9526bdfec99b7 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 10 Sep 2019 17:54:29 -0400 Subject: [PATCH] No longer needed. --- sdl1/pdcdisp.c | 3 --- sdl1/pdckbd.c | 8 -------- sdl1/pdcsdl.h | 1 - sdl2/pdcdisp.c | 3 --- sdl2/pdckbd.c | 8 -------- sdl2/pdcsdl.h | 1 - 6 files changed, 24 deletions(-) diff --git a/sdl1/pdcdisp.c b/sdl1/pdcdisp.c index c91a6573..6e91810a 100644 --- a/sdl1/pdcdisp.c +++ b/sdl1/pdcdisp.c @@ -11,8 +11,6 @@ # include "../common/acs437.h" #endif -Uint32 pdc_lastupdate = 0; - #define MAXRECT 200 /* maximum number of rects to queue up before an update is forced; the number was chosen arbitrarily */ @@ -37,7 +35,6 @@ void PDC_update_rects(void) else SDL_UpdateRects(pdc_screen, rectcount, uprect); - pdc_lastupdate = SDL_GetTicks(); rectcount = 0; } } diff --git a/sdl1/pdckbd.c b/sdl1/pdckbd.c index f6173bdf..ad40b6a5 100644 --- a/sdl1/pdckbd.c +++ b/sdl1/pdckbd.c @@ -81,16 +81,8 @@ void PDC_set_keyboard_binary(bool on) bool PDC_check_key(void) { - Uint32 current = SDL_GetTicks(); int haveevent = SDL_PollEvent(&event); - /* if we have an event, or 30 ms have passed without a screen - update, or the timer has wrapped, update now */ - - if (haveevent || - current < pdc_lastupdate || ((current - pdc_lastupdate) > 30)) - PDC_update_rects(); - return haveevent; } diff --git a/sdl1/pdcsdl.h b/sdl1/pdcsdl.h index 25209275..e499efb1 100644 --- a/sdl1/pdcsdl.h +++ b/sdl1/pdcsdl.h @@ -27,7 +27,6 @@ extern int pdc_flastc; /* font palette's last color extern bool pdc_own_screen; /* if pdc_screen was not set before initscr(), PDCurses is responsible for (owns) it */ -extern Uint32 pdc_lastupdate; /* time of last update, in ticks */ PDCEX void PDC_update_rects(void); PDCEX void PDC_retile(void); diff --git a/sdl2/pdcdisp.c b/sdl2/pdcdisp.c index fdcc5d34..79eec1f2 100644 --- a/sdl2/pdcdisp.c +++ b/sdl2/pdcdisp.c @@ -11,8 +11,6 @@ # include "../common/acs437.h" #endif -Uint32 pdc_lastupdate = 0; - #define MAXRECT 200 /* maximum number of rects to queue up before an update is forced; the number was chosen arbitrarily */ @@ -68,7 +66,6 @@ void PDC_update_rects(void) SDL_UpdateWindowSurfaceRects(pdc_window, uprect, rectcount); } - pdc_lastupdate = SDL_GetTicks(); rectcount = 0; } } diff --git a/sdl2/pdckbd.c b/sdl2/pdckbd.c index 2e0ba673..0ac76a7f 100644 --- a/sdl2/pdckbd.c +++ b/sdl2/pdckbd.c @@ -81,7 +81,6 @@ void PDC_set_keyboard_binary(bool on) bool PDC_check_key(void) { - Uint32 current = SDL_GetTicks(); int haveevent; /** @@ -93,13 +92,6 @@ bool PDC_check_key(void) haveevent = 1; else haveevent = SDL_PollEvent(&event); - /* if we have an event, or 30 ms have passed without a screen - update, or the timer has wrapped, update now */ - - if (haveevent || - current < pdc_lastupdate || ((current - pdc_lastupdate) > 30)) - PDC_update_rects(); - return haveevent; } diff --git a/sdl2/pdcsdl.h b/sdl2/pdcsdl.h index 357b4429..6fa37751 100644 --- a/sdl2/pdcsdl.h +++ b/sdl2/pdcsdl.h @@ -28,7 +28,6 @@ extern int pdc_flastc; /* font palette's last color extern bool pdc_own_window; /* if pdc_window was not set before initscr(), PDCurses is responsible for (owns) it */ -extern Uint32 pdc_lastupdate; /* time of last update, in ticks */ PDCEX void PDC_update_rects(void); PDCEX void PDC_retile(void);