1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Replace LoadIcon with LoadImage

Fixes #585.
This commit is contained in:
Camilla Berglund 2015-10-15 17:03:36 +02:00
parent 3795d78b14
commit 0aca5082ab

View File

@ -715,11 +715,15 @@ GLFWbool _glfwRegisterWindowClass(void)
wc.lpszClassName = _GLFW_WNDCLASSNAME; wc.lpszClassName = _GLFW_WNDCLASSNAME;
// Load user-provided icon if available // Load user-provided icon if available
wc.hIcon = LoadIconW(GetModuleHandleW(NULL), L"GLFW_ICON"); wc.hIcon = LoadImageW(GetModuleHandleW(NULL),
L"GLFW_ICON", IMAGE_ICON,
0, 0, LR_DEFAULTSIZE | LR_SHARED);
if (!wc.hIcon) if (!wc.hIcon)
{ {
// No user-provided icon found, load default icon // No user-provided icon found, load default icon
wc.hIcon = LoadIconW(NULL, IDI_WINLOGO); wc.hIcon = LoadImageW(NULL,
IDI_APPLICATION, IMAGE_ICON,
0, 0, LR_DEFAULTSIZE | LR_SHARED);
} }
if (!RegisterClassW(&wc)) if (!RegisterClassW(&wc))