engine: platform: win32: remove unused log variables and checks from Win32 console, sys_con does the job
This commit is contained in:
parent
c5397191e5
commit
51d11f8e86
1 changed files with 1 additions and 13 deletions
|
@ -49,10 +49,6 @@ typedef struct
|
||||||
qboolean inputEnabled;
|
qboolean inputEnabled;
|
||||||
qboolean consoleVisible;
|
qboolean consoleVisible;
|
||||||
qboolean attached;
|
qboolean attached;
|
||||||
|
|
||||||
// log stuff
|
|
||||||
qboolean log_active;
|
|
||||||
char log_path[MAX_SYSPATH];
|
|
||||||
} WinConData;
|
} WinConData;
|
||||||
|
|
||||||
static WinConData s_wcd;
|
static WinConData s_wcd;
|
||||||
|
@ -502,19 +498,13 @@ create win32 console
|
||||||
*/
|
*/
|
||||||
void Wcon_CreateConsole( qboolean con_showalways )
|
void Wcon_CreateConsole( qboolean con_showalways )
|
||||||
{
|
{
|
||||||
if( Sys_CheckParm( "-log" ))
|
|
||||||
s_wcd.log_active = true;
|
|
||||||
|
|
||||||
if( host.type == HOST_NORMAL )
|
if( host.type == HOST_NORMAL )
|
||||||
{
|
{
|
||||||
Q_strncpy( s_wcd.title, XASH_ENGINE_NAME " " XASH_VERSION, sizeof( s_wcd.title ));
|
Q_strncpy( s_wcd.title, XASH_ENGINE_NAME " " XASH_VERSION, sizeof( s_wcd.title ));
|
||||||
Q_strncpy( s_wcd.log_path, "engine.log", sizeof( s_wcd.log_path ));
|
|
||||||
}
|
}
|
||||||
else // dedicated console
|
else // dedicated console
|
||||||
{
|
{
|
||||||
Q_strncpy( s_wcd.title, XASH_DEDICATED_SERVER_NAME " " XASH_VERSION, sizeof( s_wcd.title ));
|
Q_strncpy( s_wcd.title, XASH_DEDICATED_SERVER_NAME " " XASH_VERSION, sizeof( s_wcd.title ));
|
||||||
Q_strncpy( s_wcd.log_path, "dedicated.log", sizeof( s_wcd.log_path ));
|
|
||||||
s_wcd.log_active = true; // always make log
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s_wcd.attached = ( AttachConsole( ATTACH_PARENT_PROCESS ) != 0 );
|
s_wcd.attached = ( AttachConsole( ATTACH_PARENT_PROCESS ) != 0 );
|
||||||
|
@ -596,8 +586,6 @@ void Wcon_DestroyConsole( void )
|
||||||
// last text message into console or log
|
// last text message into console or log
|
||||||
Con_Reportf( "%s: Unloading xash.dll\n", __func__ );
|
Con_Reportf( "%s: Unloading xash.dll\n", __func__ );
|
||||||
|
|
||||||
Sys_CloseLog( NULL );
|
|
||||||
|
|
||||||
if( !s_wcd.attached )
|
if( !s_wcd.attached )
|
||||||
{
|
{
|
||||||
if( s_wcd.hWnd )
|
if( s_wcd.hWnd )
|
||||||
|
|
Loading…
Add table
Reference in a new issue