# Refresh rate in fullscreen modes

**URL:** <https://discourse.libsdl.org/t/refresh-rate-in-fullscreen-modes/9803>\
**Category:** SDL Development\
**Created:** [December 4, 2003, 3:42am UTC](https://discourse.libsdl.org/t/refresh-rate-in-fullscreen-modes/9803 "2003-12-04T03:42:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Gorchak](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/mike_gorchak/32/171_2.png) [@Mike\_Gorchak](https://discourse.libsdl.org/u/Mike_Gorchak)\
**Post date:** [December 4, 2003, 3:42am UTC](https://discourse.libsdl.org/t/refresh-rate-in-fullscreen-modes/9803/1 "2003-12-04T03:42:41Z")

</div>

Hello, All!

I am thinking about refresh rates in fullscreen modes. It must be supported  
in any way in any form in SDL. So there is two available options:

1. Add a special API function

2. Do it thru the environment variables, like other things similar to that.

Most operation systems/GUIs have default refresh rates for each resolution  
mode, but for example QNX6 have not this feature, it have support of  
changing resolution mode and refresh rates to almost any value, but no  
defaults. So it would be nice to have an API function for that or  
"standartized" env. variable to override default refresh rate.

I’m planning to add this possibility in QNX6 driver soon, but as env.  
variable, so maybe someone already thinked about this and have more or less  
"standartized" env. variable name for this purpose ? 😉 Any suggestions ?

Thanks !

With best regards, Mike Gorchak. E-mail: @Mike_Gorchak

---

<div class="post-metadata">

**Author:** ![Glenn\_Maynard](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/g/bcef8e/32.png) [@Glenn\_Maynard](https://discourse.libsdl.org/u/Glenn_Maynard)\
**Post date:** [December 4, 2003, 10:19am UTC](https://discourse.libsdl.org/t/refresh-rate-in-fullscreen-modes/9803/2 "2003-12-04T10:19:01Z")

</div>

> ```
> 1b) function like SDL_SetRefreshRate(Hz), for all further global
> 
> ```
> 
> operations (looks like env. variable, but it is easy to use).

I’ve implemented SDL\_SetRefreshRate in the local SDL hack for StepMania.  
It’s only implemented for Windows. I’ve intended to send a patch for  
this, but I’ve been too busy; if you want to pull it out and try to get  
it applied, feel free: the code’s in the CVS tree under  
[StepMania download | SourceForge.net](http://sf.net/projects/stepmania) in src/SDL-1.2.6.

Note that it’s not perfect. There’s no way to find out the available  
refresh rates for a given configuration. I’m not sure if it works for  
the DirectX end; I only use the WinDIB driver.

> 1. Do it thru the environment variables, like other things similar to that.

Configuring graphics settings for apps with environment variables is  
ugly. It’s disgusting that the only way I can find to control vsync in  
X is through env vars …On Thu, Dec 04, 2003 at 01:36:36PM +0200, Mike Gorchak wrote:

–  
Glenn Maynard
