Skip to content

Commit 283929b

Browse files
committed
leaving this here.
1 parent 000546e commit 283929b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/funkin/backend/utils/native/Windows.hx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ final class Windows {
185185
')
186186
public static function setWindowTitleColor(title:String, color:Array<Int>) {}
187187

188+
@:functionCode('
189+
HWND window = GetConsoleWindow();
190+
HICON smallIcon = (HICON) LoadImage(NULL, path, IMAGE_ICON, 16, 16, LR_LOADFROMFILE);
191+
HICON icon = (HICON) LoadImage(NULL, path, IMAGE_ICON, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
192+
SendMessage(window, WM_SETICON, ICON_SMALL, (LPARAM)smallIcon);
193+
SendMessage(window, WM_SETICON, ICON_BIG, (LPARAM)icon);
194+
')
195+
public static function setWindowIcon(path:String) {}
196+
197+
188198
@:functionCode('
189199
// https://stackoverflow.com/questions/15543571/allocconsole-not-displaying-cout
190200

0 commit comments

Comments
 (0)