Skip to content
Snippets Groups Projects
Commit 0aca5082 authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Replace LoadIcon with LoadImage

Fixes #585.
parent 3795d78b
No related branches found
No related tags found
No related merge requests found
......@@ -715,11 +715,15 @@ GLFWbool _glfwRegisterWindowClass(void)
wc.lpszClassName = _GLFW_WNDCLASSNAME;
// 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)
{
// 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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment