From fa7901d91801ede4132ae8a0ddda070388ecf918 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 31 Jan 2022 10:28:49 -0500 Subject: [PATCH] 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. --- native/viocalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/native/viocalls.c b/native/viocalls.c index f9a0c1a..8b424a8 100644 --- a/native/viocalls.c +++ b/native/viocalls.c @@ -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);