mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-27 06:32:27 +00:00
make "./dhewm3 +set in_tty 0" actually work
the problem was that the CVar was initialized from the commandline *after* Posix_InitConsoleInput() is called, so it was too late. common->StartupVariable() seems to be the right way to initialize a CVar early.
This commit is contained in:
parent
da63c4f41c
commit
5c99ff4657
1 changed files with 3 additions and 1 deletions
|
@ -363,6 +363,8 @@ Posix_InitConsoleInput
|
|||
void Posix_InitConsoleInput( void ) {
|
||||
struct termios tc;
|
||||
|
||||
common->StartupVariable( "in_tty", false );
|
||||
|
||||
if ( in_tty.GetBool() ) {
|
||||
if ( isatty( STDIN_FILENO ) != 1 ) {
|
||||
Sys_Printf( "terminal support disabled: stdin is not a tty\n" );
|
||||
|
@ -415,7 +417,7 @@ void Posix_InitConsoleInput( void ) {
|
|||
Sys_Printf( "WARNING: terminal type '%s' is unknown. terminal support may not work correctly\n", term );
|
||||
}
|
||||
}
|
||||
Sys_Printf( "terminal support enabled ( use +set in_tty 0 to disabled )\n" );
|
||||
Sys_Printf( "terminal support enabled ( use +set in_tty 0 to disable )\n" );
|
||||
} else {
|
||||
Sys_Printf( "terminal support disabled\n" );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue