mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-09 23:02:02 +00:00
Convert the quake2.exe wrapper to a Windows GUI application.
While building the wrapper as a console application is completely fine there're some advantages by creating a "real" Windows GUI Application: * Console applications always spawn an annoying console window. * Windows GUI applications seem to have a much lower chance to trigger my new best friend, the Windows Defender. As a console application quake.exe triggered every time I started it, as Windows GUI application not only once. Use WinMain() instead of wWinMain() because MinGW doesn't know about the later and it doesn't matter anyways.
This commit is contained in:
parent
7ee34acae8
commit
bed6439d19
2 changed files with 2 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -1061,7 +1061,7 @@ release/yquake2.exe : $(CLIENT_OBJS) icon
|
|||
$(Q)strip $@
|
||||
# the wrappper, quick'n'dirty
|
||||
release/quake2.exe : src/win-wrapper/wrapper.c icon
|
||||
$(Q)$(CC) -Wall build/icon/icon.res src/win-wrapper/wrapper.c -o $@
|
||||
$(Q)$(CC) -Wall -mwindows build/icon/icon.res src/win-wrapper/wrapper.c -o $@
|
||||
$(Q)strip $@
|
||||
else
|
||||
release/quake2 : $(CLIENT_OBJS)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
static const WCHAR WRAPPED_EXE[] = L"yquake2.exe";
|
||||
|
||||
int main(int argc, char** argv)
|
||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||
{
|
||||
WCHAR* cmdLine = GetCommandLineW();
|
||||
WCHAR exePath[2048];
|
||||
|
|
Loading…
Reference in a new issue