From 8d27dba4cdec4d3b39bf87ce5baef5962e58312c Mon Sep 17 00:00:00 2001 From: withmorten Date: Sat, 13 Feb 2021 15:50:56 +0100 Subject: glfw window icon --- src/skel/glfw/glfw.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/skel') diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index b44e5750..baed9000 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -52,6 +52,11 @@ long _dwOperatingSystemVersion; #define MAX_SUBSYSTEMS (16) +#ifdef _WIN32 +#define GLFW_EXPOSE_NATIVE_WIN32 +#include +#endif + rw::EngineOpenParams openParams; @@ -1560,6 +1565,15 @@ main(int argc, char *argv[]) return 0; } +#ifdef _WIN32 + HWND wnd = glfwGetWin32Window(PSGLOBAL(window)); + + HICON icon = LoadIcon(instance, MAKEINTRESOURCE(IDI_MAIN_ICON)); + + SendMessage(wnd, WM_SETICON, ICON_BIG, (LPARAM)icon); + SendMessage(wnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); +#endif + psPostRWinit(); ControlsManager.InitDefaultControlConfigMouse(MousePointerStateHelper.GetMouseSetUp()); -- cgit v1.2.3