-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I noticed this when running a self-compiled binary of rsc-c on my m1 macos air laptop: when using SDL2 as the renderer, the overall image displays rather blurry. I was able to track down the root cause, which can be attributed to using a Retina display.
I found an article which describes a fix, located here: https://www.studyplan.dev/sdl-dev/sdl-setup-mac/q/sdl2-macos-retina-display
I tried this out myself, by setting the following flag within mudclient-sdl2.c
:
SDL_SetHint(SDL_HINT_VIDEO_HIGHDPI_DISABLED, "0");
and adding the second mask to the following line:
uint32_t windowflags = SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI;
Doing so does result in correcting the issue, which may be seen in the following annotated screenshots:
Unfortunately I don't have enough time to create a proper PR at the moment, which I imagine would only apply these changes if the process is running on macOS with a retina display (as to avoid possible unintended side-effects with things like non-retina displays or native Windows OS scaling). As such, I wanted to at least document this issue and my findings here.