1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Removed cached instance handle.

This commit is contained in:
Camilla Berglund 2013-02-01 04:05:12 +01:00
parent b872089fa9
commit 231ee1bdc7
3 changed files with 4 additions and 7 deletions

View File

@ -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;
}

View File

@ -157,7 +157,6 @@ typedef struct _GLFWwindowWin32
//------------------------------------------------------------------------
typedef struct _GLFWlibraryWin32
{
HINSTANCE instance;
ATOM classAtom;
DWORD foregroundLockTimeout;
char* clipboardString;

View File

@ -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);