I recently got a new 4k monitor, and have it running alongside my old 1080p 26" monitor. I’m not sure if the dual setup matters.
When I run my game on the 4k, SDL_GetDesktopDisplayMode reports a window height of 1440. I tried swapping it out for SDL_GetCurrentDisplayMode, but it still reports 1440.
I did a little Googling and found a suggestion for a similar issue (not exactly the same; in this person’s case, he was creating a 1920x1080 window which was filling his 4k screen) that this is probably due to High DPI settings in Windows, which I thought might be worth a shot. I added SDL_WINDOW_ALLOW_HIGHDPI to my init flags as so (this is Ada code):
if (SDL_Init(SDL_INIT_VIDEO or SDL_INIT_AUDIO or SDL_INIT_JOYSTICK or SDL_INIT_GAMECONTROLLER or SDL_WINDOW_ALLOW_HIGHDPI) < 0) then raise SDL_Init_Failed; --this is a custom Exception end if;
Still reporting 1440. Am I missing something? I’ve seen some other topics here suggesting High DPI support is still in the works, but I’m not sure that’s even the problem and also those topics were kind of old so I don’t know if that’s been completed yet.