mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
added the option to hide the console window on the client, too. Fixes #48
This commit is contained in:
parent
eecdff0cf5
commit
3baf522330
|
@ -25,6 +25,12 @@
|
|||
|
||||
#include "client.h"
|
||||
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
#define _WIN32_WINNT 0x0500
|
||||
#define NOGDI
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
void CGraph::Init(float Min, float Max)
|
||||
{
|
||||
|
@ -1997,6 +2003,17 @@ extern "C" int SDL_main(int argc, const char **argv) // ignore_convention
|
|||
int main(int argc, const char **argv) // ignore_convention
|
||||
#endif
|
||||
{
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
for(int i = 1; i < argc; i++) // ignore_convention
|
||||
{
|
||||
if(str_comp("-s", argv[i]) == 0 || str_comp("--silent", argv[i]) == 0) // ignore_convention
|
||||
{
|
||||
ShowWindow(GetConsoleWindow(), SW_HIDE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// init the engine
|
||||
dbg_msg("client", "starting...");
|
||||
m_Client.InitEngine("Teeworlds");
|
||||
|
|
Loading…
Reference in a new issue