mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Removed cached instance handle.
This commit is contained in:
parent
b872089fa9
commit
231ee1bdc7
@ -179,8 +179,6 @@ int _glfwPlatformInit(void)
|
||||
_control87(MCW_EM, MCW_EM);
|
||||
#endif
|
||||
|
||||
_glfw.win32.instance = GetModuleHandle(NULL);
|
||||
|
||||
// Save the original gamma ramp
|
||||
_glfw.originalRampSize = 256;
|
||||
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
||||
@ -204,7 +202,7 @@ void _glfwPlatformTerminate(void)
|
||||
|
||||
if (_glfw.win32.classAtom)
|
||||
{
|
||||
UnregisterClass(_GLFW_WNDCLASSNAME, _glfw.win32.instance);
|
||||
UnregisterClass(_GLFW_WNDCLASSNAME, GetModuleHandle(NULL));
|
||||
_glfw.win32.classAtom = 0;
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,6 @@ typedef struct _GLFWwindowWin32
|
||||
//------------------------------------------------------------------------
|
||||
typedef struct _GLFWlibraryWin32
|
||||
{
|
||||
HINSTANCE instance;
|
||||
ATOM classAtom;
|
||||
DWORD foregroundLockTimeout;
|
||||
char* clipboardString;
|
||||
|
@ -680,14 +680,14 @@ static ATOM registerWindowClass(void)
|
||||
wc.lpfnWndProc = (WNDPROC) windowProc; // Message handler
|
||||
wc.cbClsExtra = 0; // No extra class data
|
||||
wc.cbWndExtra = sizeof(void*) + sizeof(int); // Make room for one pointer
|
||||
wc.hInstance = _glfw.win32.instance; // Set instance
|
||||
wc.hInstance = GetModuleHandle(NULL); // Set instance
|
||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW); // Load arrow pointer
|
||||
wc.hbrBackground = NULL; // No background
|
||||
wc.lpszMenuName = NULL; // No menu
|
||||
wc.lpszClassName = _GLFW_WNDCLASSNAME; // Set class name
|
||||
|
||||
// Load user-provided icon if available
|
||||
wc.hIcon = LoadIcon(_glfw.win32.instance, L"GLFW_ICON");
|
||||
wc.hIcon = LoadIcon(GetModuleHandle(NULL), L"GLFW_ICON");
|
||||
if (!wc.hIcon)
|
||||
{
|
||||
// Load default icon
|
||||
@ -774,7 +774,7 @@ static int createWindow(_GLFWwindow* window,
|
||||
fullHeight, // Decorated window height
|
||||
NULL, // No parent window
|
||||
NULL, // No menu
|
||||
_glfw.win32.instance,
|
||||
GetModuleHandle(NULL),
|
||||
window); // Pass GLFW window to WM_CREATE
|
||||
|
||||
free(wideTitle);
|
||||
|
Loading…
Reference in New Issue
Block a user