vio: Don't init ncurses in VioGetMode().

Info-Zip unzip.exe uses this but doesn't actually _need_ anything but
stdout, so don't mess up the terminal if we don't have to.

We might actually _need_ to query terminal characteristics at some point
in a complete implementation of VioGetMode, but for now this is fine.
This commit is contained in:
Ryan C. Gordon committed 2022-01-31 10:28:49 -05:00
1 parent 86446d8d9c
commit fa7901d918
1 file changed
+4 -2
+4 -2
View File
@@ -209,8 +209,10 @@ APIRET16 VioGetMode(PVIOMODEINFO pvioModeInfo, HVIO hvio)
return ERROR_VIO_INVALID_PARMS;
else if (pvioModeInfo->cb != sizeof (*pvioModeInfo))
return ERROR_VIO_INVALID_LENGTH;
else if (!initNcurses())
return ERROR_VIO_INVALID_HANDLE;
FIXME("might need to init ncurses at some point, but not yet.");
//else if (!initNcurses())
// return ERROR_VIO_INVALID_HANDLE;
memset(pvioModeInfo, '\0', sizeof (*pvioModeInfo));
pvioModeInfo->cb = sizeof (*pvioModeInfo);