1
0
Fork 0
forked from len0rd/rockbox

simulator: Adjust scaling using keyboard shortcuts

Press 0-3 to to adjust current zoom level
to 50% (0), 100% (1), 200% (2), or 300% (3).

Press 4 to switch between "best" (linear)
and nearest pixel sampling.

Change-Id: Id10d361659855a0ad9c97e6b341f498f72709ef5
This commit is contained in:
Christian Soffke 2024-12-22 12:50:59 +01:00
parent 759cbf4e5f
commit 7aaa722a5d
3 changed files with 55 additions and 22 deletions

View file

@ -113,6 +113,7 @@ static void sdl_window_setup(void)
panicf("%s", SDL_GetError());
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, display_zoom == 1 ? "best" : "nearest");
display_zoom = 0; /* keeps track of user requesting a scale level change */
SDL_RenderSetLogicalSize(sdlRenderer, width, height);
if ((gui_surface = SDL_CreateRGBSurface(0, width, height, depth,