Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
glfw window icon
  • Loading branch information
withmorten committed Feb 13, 2021
1 parent 02ac7c3 commit 8d27dba4cdec4d3b39bf87ce5baef5962e58312c
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/skel/glfw/glfw.cpp
@@ -52,6 +52,11 @@ long _dwOperatingSystemVersion;

#define MAX_SUBSYSTEMS (16)

#ifdef _WIN32
#define GLFW_EXPOSE_NATIVE_WIN32
#include <GLFW/glfw3native.h>
#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());

0 comments on commit 8d27dba

Please sign in to comment.