Skip to main content
GameDev.net gamedev.net
šŸ”’ Locked

getting the monitors refresh rate

Started by Jake S. C++ Oct 26, 2012 at 9:38 PM 0 replies 3.4k views
Original Post
Jake S. C++
Jake S. C++
Is there any way to get the monitor's refresh rate in hz using SDL? I assumed it would be in SDL_GetVideoInfo() but it's unfortunately I was wrong. I'm using SDL 1.2.

Thanks in advance.
Saruman
Saruman
I'm not sure about 1.2 but in version 1.3 you can call:
[source lang="cpp"]SDL_DisplayMode mode;
SDL_GetDisplayMode(mode_index, &mode);
[/source]
Which will give you the SDL_DisplayMode struct containing format, width, height, refresh rate.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.