mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Win32: Make monitor area retrieval more consistent
The rest of this file uses GetMonitorInfoW to retrieve this information.
This commit is contained in:
parent
685de9089f
commit
7dfd84c458
@ -1284,15 +1284,16 @@ static int createNativeWindow(_GLFWwindow* window,
|
|||||||
|
|
||||||
if (window->monitor)
|
if (window->monitor)
|
||||||
{
|
{
|
||||||
GLFWvidmode mode;
|
MONITORINFO mi = { sizeof(mi) };
|
||||||
|
GetMonitorInfoW(window->monitor->win32.handle, &mi);
|
||||||
|
|
||||||
// NOTE: This window placement is temporary and approximate, as the
|
// NOTE: This window placement is temporary and approximate, as the
|
||||||
// correct position and size cannot be known until the monitor
|
// correct position and size cannot be known until the monitor
|
||||||
// video mode has been picked in _glfwSetVideoModeWin32
|
// video mode has been picked in _glfwSetVideoModeWin32
|
||||||
_glfwGetMonitorPosWin32(window->monitor, &xpos, &ypos);
|
xpos = mi.rcMonitor.left;
|
||||||
_glfwGetVideoModeWin32(window->monitor, &mode);
|
ypos = mi.rcMonitor.top;
|
||||||
fullWidth = mode.width;
|
fullWidth = mi.rcMonitor.right - mi.rcMonitor.left;
|
||||||
fullHeight = mode.height;
|
fullHeight = mi.rcMonitor.bottom - mi.rcMonitor.top;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user