mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05: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);
|
_control87(MCW_EM, MCW_EM);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_glfw.win32.instance = GetModuleHandle(NULL);
|
|
||||||
|
|
||||||
// Save the original gamma ramp
|
// Save the original gamma ramp
|
||||||
_glfw.originalRampSize = 256;
|
_glfw.originalRampSize = 256;
|
||||||
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
|
||||||
|
@ -204,7 +202,7 @@ void _glfwPlatformTerminate(void)
|
||||||
|
|
||||||
if (_glfw.win32.classAtom)
|
if (_glfw.win32.classAtom)
|
||||||
{
|
{
|
||||||
UnregisterClass(_GLFW_WNDCLASSNAME, _glfw.win32.instance);
|
UnregisterClass(_GLFW_WNDCLASSNAME, GetModuleHandle(NULL));
|
||||||
_glfw.win32.classAtom = 0;
|
_glfw.win32.classAtom = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,6 @@ typedef struct _GLFWwindowWin32
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
typedef struct _GLFWlibraryWin32
|
typedef struct _GLFWlibraryWin32
|
||||||
{
|
{
|
||||||
HINSTANCE instance;
|
|
||||||
ATOM classAtom;
|
ATOM classAtom;
|
||||||
DWORD foregroundLockTimeout;
|
DWORD foregroundLockTimeout;
|
||||||
char* clipboardString;
|
char* clipboardString;
|
||||||
|
|
|
@ -680,14 +680,14 @@ static ATOM registerWindowClass(void)
|
||||||
wc.lpfnWndProc = (WNDPROC) windowProc; // Message handler
|
wc.lpfnWndProc = (WNDPROC) windowProc; // Message handler
|
||||||
wc.cbClsExtra = 0; // No extra class data
|
wc.cbClsExtra = 0; // No extra class data
|
||||||
wc.cbWndExtra = sizeof(void*) + sizeof(int); // Make room for one pointer
|
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.hCursor = LoadCursor(NULL, IDC_ARROW); // Load arrow pointer
|
||||||
wc.hbrBackground = NULL; // No background
|
wc.hbrBackground = NULL; // No background
|
||||||
wc.lpszMenuName = NULL; // No menu
|
wc.lpszMenuName = NULL; // No menu
|
||||||
wc.lpszClassName = _GLFW_WNDCLASSNAME; // Set class name
|
wc.lpszClassName = _GLFW_WNDCLASSNAME; // Set class name
|
||||||
|
|
||||||
// Load user-provided icon if available
|
// 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)
|
if (!wc.hIcon)
|
||||||
{
|
{
|
||||||
// Load default icon
|
// Load default icon
|
||||||
|
@ -774,7 +774,7 @@ static int createWindow(_GLFWwindow* window,
|
||||||
fullHeight, // Decorated window height
|
fullHeight, // Decorated window height
|
||||||
NULL, // No parent window
|
NULL, // No parent window
|
||||||
NULL, // No menu
|
NULL, // No menu
|
||||||
_glfw.win32.instance,
|
GetModuleHandle(NULL),
|
||||||
window); // Pass GLFW window to WM_CREATE
|
window); // Pass GLFW window to WM_CREATE
|
||||||
|
|
||||||
free(wideTitle);
|
free(wideTitle);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user