title: How to get the screen refresh rate?
body: <p>Is this even possible? Since ive noticed v-sync doesnt work on my laptop at all, so i am building FPS limiter "manually" and now i would like to use the FPS limit the user has set to his screen.</p>
  
  <p><strong>Edit:</strong> i mean the monitor hz rate.</p>
  
  <p><strong>Edit3:</strong> heres the code i got working (i think... anything wrong there?):</p>
  
  <pre><code>DEVMODE lpDevMode;
  memset(&amp;lpDevMode, 0, sizeof(DEVMODE));
  lpDevMode.dmSize = sizeof(DEVMODE);
  lpDevMode.dmDriverExtra = 0;
  
  if(EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &amp;lpDevMode) == 0){
      framerate_limit = 60; // default value if cannot retrieve from user settings.
  }
  </code></pre>
  
  <p>On demand, here is my v-sync enabling code jay.lee asked for:</p>
  
  <pre><code>PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL; // global
  
  ...
  
  wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress("wglSwapIntervalEXT");
  
  v_sync_enabled = 0;
  if(wglSwapIntervalEXT != NULL){
      if(wglSwapIntervalEXT(1) != FALSE){
          v_sync_enabled = 1;
      }
  }
  </code></pre>