diff --git a/internal/glfwwin/win32monitor_windows.go b/internal/glfwwin/win32monitor_windows.go index 78cbd101a..c49e7b275 100644 --- a/internal/glfwwin/win32monitor_windows.go +++ b/internal/glfwwin/win32monitor_windows.go @@ -30,9 +30,8 @@ import ( "golang.org/x/sys/windows" ) -func monitorCallback(handle _HMONITOR, dc _HDC, rect *_RECT, data _LPARAM) uintptr /* _BOOL */ { +func monitorCallback(handle _HMONITOR, dc _HDC, rect *_RECT, monitor *Monitor /* _LPARAM */) uintptr /* _BOOL */ { if mi, ok := _GetMonitorInfoW_Ex(handle); ok { - monitor := (*Monitor)(unsafe.Pointer(data)) if windows.UTF16ToString(mi.szDevice[:]) == monitor.win32.adapterName { monitor.win32.handle = handle }