mirror of
https://github.com/godotengine/godot.git
synced 2026-02-07 19:32:36 +00:00
[Windows] Use executable icon as default for the window.
This commit is contained in:
@@ -7153,6 +7153,11 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
|
||||
|
||||
OleInitialize(nullptr);
|
||||
|
||||
HICON default_icon = LoadIconW(GetModuleHandle(nullptr), L"GODOT_ICON");
|
||||
if (default_icon == nullptr) {
|
||||
default_icon = LoadIcon(nullptr, IDI_WINLOGO);
|
||||
}
|
||||
|
||||
memset(&wc, 0, sizeof(WNDCLASSEXW));
|
||||
wc.cbSize = sizeof(WNDCLASSEXW);
|
||||
wc.style = CS_OWNDC | CS_DBLCLKS;
|
||||
@@ -7160,7 +7165,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = hInstance ? hInstance : GetModuleHandle(nullptr);
|
||||
wc.hIcon = LoadIcon(nullptr, IDI_WINLOGO);
|
||||
wc.hIcon = default_icon;
|
||||
wc.hCursor = nullptr;
|
||||
wc.hbrBackground = nullptr;
|
||||
wc.lpszMenuName = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user