The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
SDL
Simple Directmedia Layer Forums
How to get the updated screen resolution?
A_SN
Joined: 17 Dec 2014
Posts: 5
Posted: Sun Oct 02, 2016 12:13 pm
Let's say I do the following:
-set my screen resolution in Windows to 1920x1080
-start my program
-call SDL_GetCurrentDisplayMode() or SDL_GetDisplayBounds() which gives me 1920x1080
-change my screen resolution in Windows to 1440x900
-call SDL_GetCurrentDisplayMode() or SDL_GetDisplayBounds() which STILL gives me 1920x1080
It seems like these functions simply return some stored values without updating. What can I do in order to get up-to-date values?