mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Ripped out horribly broken refresh rate mess.
This commit is contained in:
@@ -377,7 +377,6 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
_glfwSetVideoMode(&_glfwLibrary.Win32.monitor.width,
|
||||
&_glfwLibrary.Win32.monitor.height,
|
||||
&_glfwLibrary.Win32.monitor.bitsPerPixel,
|
||||
&_glfwLibrary.Win32.monitor.refreshRate,
|
||||
GL_TRUE);
|
||||
|
||||
_glfwLibrary.Win32.monitor.modeChanged = GL_TRUE;
|
||||
@@ -868,8 +867,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
{
|
||||
int status;
|
||||
|
||||
window->Win32.desiredRefreshRate = wndconfig->refreshRate;
|
||||
|
||||
if (!_glfwLibrary.Win32.classAtom)
|
||||
{
|
||||
_glfwLibrary.Win32.classAtom = registerWindowClass();
|
||||
@@ -885,13 +882,11 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
|
||||
_glfwLibrary.Win32.monitor.width = window->width;
|
||||
_glfwLibrary.Win32.monitor.height = window->height;
|
||||
_glfwLibrary.Win32.monitor.refreshRate = wndconfig->refreshRate;
|
||||
_glfwLibrary.Win32.monitor.bitsPerPixel = bpp;
|
||||
|
||||
_glfwSetVideoMode(&_glfwLibrary.Win32.monitor.width,
|
||||
&_glfwLibrary.Win32.monitor.height,
|
||||
&_glfwLibrary.Win32.monitor.bitsPerPixel,
|
||||
&_glfwLibrary.Win32.monitor.refreshRate,
|
||||
GL_FALSE);
|
||||
|
||||
_glfwLibrary.Win32.monitor.modeChanged = GL_TRUE;
|
||||
@@ -1069,28 +1064,6 @@ void _glfwPlatformHideWindow(_GLFWwindow* window)
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Write back window parameters into GLFW window structure
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformRefreshWindowParams(_GLFWwindow* window)
|
||||
{
|
||||
DEVMODE dm;
|
||||
|
||||
ZeroMemory(&dm, sizeof(DEVMODE));
|
||||
dm.dmSize = sizeof(DEVMODE);
|
||||
|
||||
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm))
|
||||
{
|
||||
window->refreshRate = dm.dmDisplayFrequency;
|
||||
if (window->refreshRate <= 1)
|
||||
window->refreshRate = 0;
|
||||
}
|
||||
else
|
||||
window->refreshRate = 0;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Poll for new window and input events
|
||||
//========================================================================
|
||||
|
||||
Reference in New Issue
Block a user