mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-18 12:08:38 +00:00
Set the window class icons of the game window from resource 1 of totk.exe, so the title bar, taskbar and Alt+Tab show the green ring
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a9a7762ead
commit
0409863bc9
1 file changed
+5
@@ -340,7 +340,12 @@ static LRESULT CALLBACK wnd_proc(HWND h, UINT m, WPARAM w, LPARAM l) {
|
||||
static DWORD WINAPI window_main(void *arg) {
|
||||
(void)arg;
|
||||
HINSTANCE inst = GetModuleHandleW(NULL);
|
||||
// Icon resource 1 of totk.rc (runtime/totk.ico): the title bar, the taskbar button and Alt+Tab.
|
||||
WNDCLASSEXW wc = {.cbSize = sizeof wc, .lpfnWndProc = wnd_proc, .hInstance = inst,
|
||||
.hIcon = LoadImageW(inst, MAKEINTRESOURCEW(1), IMAGE_ICON, GetSystemMetrics(SM_CXICON),
|
||||
GetSystemMetrics(SM_CYICON), LR_SHARED),
|
||||
.hIconSm = LoadImageW(inst, MAKEINTRESOURCEW(1), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
|
||||
GetSystemMetrics(SM_CYSMICON), LR_SHARED),
|
||||
.hCursor = LoadCursorW(NULL, (LPCWSTR)IDC_ARROW), .lpszClassName = L"TotKRecompWindow"};
|
||||
RegisterClassExW(&wc);
|
||||
int cw, ch;
|
||||
|
||||
Reference in new issue
Block a user