Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into better_vscode_tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
wysaid committed Dec 10, 2023
2 parents 2b72c00 + eaaef29 commit e0c821b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/ege.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ enum initmode_flag {
INIT_RENDERMANUAL = 0x8,
INIT_NOFORCEEXIT = 0x10,
INIT_UNICODE = 0x20,
INIT_HIDE = 0x40,
INIT_WITHLOGO = 0x100,
INIT_ANIMATION = INIT_DEFAULT | INIT_RENDERMANUAL | INIT_NOFORCEEXIT,
};
Expand Down
13 changes: 8 additions & 5 deletions src/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,8 @@ init_instance(HINSTANCE hInstance) {
//DeleteObject(hfont);
} //*/

SetActiveWindow(pg->hwnd);
if (!(g_initoption & INIT_HIDE))
SetActiveWindow(pg->hwnd);

pg->exit_window = 0;
return TRUE;
Expand Down Expand Up @@ -1286,9 +1287,11 @@ initgraph(int *gdriver, int *gmode, const char *path) {

UpdateWindow(pg->hwnd);

ShowWindow(pg->hwnd, SW_SHOWNORMAL);
BringWindowToTop(pg->hwnd);
SetForegroundWindow(pg->hwnd);
if (!(g_initoption & INIT_HIDE)) {
ShowWindow(pg->hwnd, SW_SHOWNORMAL);
BringWindowToTop(pg->hwnd);
SetForegroundWindow(pg->hwnd);
}

if (g_windowexstyle & WS_EX_TOPMOST) {
SetWindowPos(pg->hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
Expand All @@ -1303,7 +1306,7 @@ initgraph(int *gdriver, int *gmode, const char *path) {

static egeControlBase _egeControlBase;

if (g_initoption & INIT_WITHLOGO)
if ((g_initoption & INIT_WITHLOGO) && !(g_initoption & INIT_HIDE))
logoscene();

if (g_initoption & INIT_RENDERMANUAL)
Expand Down

0 comments on commit e0c821b

Please sign in to comment.