uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 33940d3b5b673fcad1c5a116257985918406a832
parent 7511f4c2ac8ce4125c726dfe8d27e1e2efa05e0e
Author: Liam Cooke <liam@liamcooke.com>
Date:   Sat, 29 Jan 2022 13:13:01 +1100

Fix blurry pixels on high-DPI displays

Creates the uxnemu window in high-DPI mode when supported. Now it looks
pixel perfect on a display with 2:1 pixel density.

Should have no effect on a 1:1 display, but I don't have access to one
to test this.

Diffstat:
Msrc/uxnemu.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/uxnemu.c b/src/uxnemu.c @@ -141,7 +141,7 @@ init(void) as.userdata = NULL; if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) < 0) return error("sdl", SDL_GetError()); - gWindow = SDL_CreateWindow("Uxn", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, (WIDTH + PAD * 2) * zoom, (HEIGHT + PAD * 2) * zoom, SDL_WINDOW_SHOWN); + gWindow = SDL_CreateWindow("Uxn", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, (WIDTH + PAD * 2) * zoom, (HEIGHT + PAD * 2) * zoom, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI); if(gWindow == NULL) return error("sdl_window", SDL_GetError()); gRenderer = SDL_CreateRenderer(gWindow, -1, 0);