Skip to content
Snippets Groups Projects
Commit 2c065852 authored by deuce's avatar deuce
Browse files

suspend/resume fixes.

parent 4de19558
No related branches found
No related tags found
No related merge requests found
...@@ -495,10 +495,10 @@ void win32_suspend(void) ...@@ -495,10 +495,10 @@ void win32_suspend(void)
{ {
HANDLE h; HANDLE h;
if((h=GetStdHandle(STD_INPUT_HANDLE)) != INVALID_HANDLE_VALUE)
SetConsoleMode(h, orig_in_conmode);
if((h=GetStdHandle(STD_OUTPUT_HANDLE)) != INVALID_HANDLE_VALUE) if((h=GetStdHandle(STD_OUTPUT_HANDLE)) != INVALID_HANDLE_VALUE)
SetConsoleMode(h, orig_out_conmode); SetConsoleMode(h, orig_out_conmode);
if((h=GetStdHandle(STD_INPUT_HANDLE)) != INVALID_HANDLE_VALUE)
SetConsoleMode(h, orig_in_conmode);
} }
void win32_resume(void) void win32_resume(void)
...@@ -506,9 +506,7 @@ void win32_resume(void) ...@@ -506,9 +506,7 @@ void win32_resume(void)
DWORD conmode; DWORD conmode;
HANDLE h; HANDLE h;
conmode=orig_in_conmode; conmode=ENABLE_MOUSE_INPUT;
conmode&=~(ENABLE_PROCESSED_INPUT|ENABLE_QUICK_EDIT_MODE);
conmode|=ENABLE_MOUSE_INPUT;
if((h=GetStdHandle(STD_INPUT_HANDLE)) != INVALID_HANDLE_VALUE) if((h=GetStdHandle(STD_INPUT_HANDLE)) != INVALID_HANDLE_VALUE)
SetConsoleMode(h, conmode); SetConsoleMode(h, conmode);
...@@ -536,8 +534,7 @@ int win32_initciolib(long inmode) ...@@ -536,8 +534,7 @@ int win32_initciolib(long inmode)
if((h=GetStdHandle(STD_INPUT_HANDLE))==INVALID_HANDLE_VALUE if((h=GetStdHandle(STD_INPUT_HANDLE))==INVALID_HANDLE_VALUE
|| !GetConsoleMode(h, &orig_in_conmode)) || !GetConsoleMode(h, &orig_in_conmode))
return(0); return(0);
conmode=0; conmode=ENABLE_MOUSE_INPUT;
conmode|=ENABLE_MOUSE_INPUT;
if(!SetConsoleMode(h, conmode)) if(!SetConsoleMode(h, conmode))
return(0); return(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment