From 0409863bc9b18f5ee54ed2dfdcd4a1b2d6937f05 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Mon, 26 Oct 2026 17:23:07 +0300 Subject: [PATCH] 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 --- runtime/gfx_window.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/gfx_window.c b/runtime/gfx_window.c index c95fba94..9dfe8cab 100644 --- a/runtime/gfx_window.c +++ b/runtime/gfx_window.c @@ -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;