File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ int putenv(char*);
114114
115115//#link ncurses
116116
117+ bool CRT_linuxConsole = false;
118+
117119bool CRT_hasColors ;
118120
119121int CRT_delay ;
@@ -162,6 +164,8 @@ void CRT_init() {
162164 if (strcmp (term , "xterm" ) == 0 ) {
163165 putenv ("TERM=xterm-color" );
164166 term = "xterm-color" ;
167+ } else if (strcmp (term , "linux" ) == 0 ) {
168+ CRT_linuxConsole = true;
165169 }
166170
167171 CRT_delay = 0 ;
@@ -514,8 +518,10 @@ int CRT_getCharacter() {
514518 #else
515519 unsigned int modifiers = 6 ;
516520 #endif
517- int err = ioctl (0 , TIOCLINUX , & modifiers );
518- if (err ) return ch ;
521+ if (CRT_linuxConsole ) {
522+ int err = ioctl (0 , TIOCLINUX , & modifiers );
523+ if (err ) return ch ;
524+ }
519525 switch (modifiers ) {
520526 case SHIFT_MASK :
521527 switch (ch ) {
You can’t perform that action at this time.
0 commit comments