sdl: Keep texture around, upload LCD-parts only

No need to create a new texture for every
rendered frame, unless the scaling method
has been adjusted.

We also don't need to upload the (unchanged)
player interface to GPU memory repeatedly.

+ Remove unused lcd_display_redraw &
having_new_lcd variables

Change-Id: I5bff6aa2d54347a3f2c3afba8d8d7eb9e39f77f7
This commit is contained in:
Christian Soffke 2024-12-22 22:55:27 +01:00
parent 7aaa722a5d
commit 400452180d
8 changed files with 279 additions and 186 deletions

View file

@ -25,15 +25,6 @@
#include "lcd.h"
#include "SDL.h"
/* Default display zoom level */
extern SDL_Surface *gui_surface;
extern SDL_Renderer *sdlRenderer;
extern SDL_Window *window;
void sdl_get_window_dimensions(int *w, int *h);
int sdl_update_window(void);
void sdl_window_needs_update(void);
void sdl_update_rect(SDL_Surface *surface, int x_start, int y_start, int width,
int height, int max_x, int max_y,
unsigned long (*getpixel)(int, int));