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:
Yamagi Burmeister 2018-02-03 13:29:14 +01:00
parent 7ee34acae8
commit bed6439d19
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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];