From 147e53b63cb9f3e00c340bd32980eb2a51e972f0 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 22 Jun 2022 15:00:38 +0200 Subject: PDCursesMod/WinGUI now uses the polling fallback again with a temporary workaround * The keyboard hook required polling as well and was actually much less performant than the generic getch() polling fallback. Furthemore it did at least not work on Wine. * We instead now release the WinGUI-internal mutex and yield the thread giving it some time to process new key presses. * This workaround is temporary and will probably be part of the the next PDCursesMod-release (v4.3.4). We still want to support the latest MSYS/MinGW version though which is currently at v4.3.2. The fix will also currently only work when statically linking in libpdcurses_wingui.a. This is what we do for nightly builds. See also https://github.com/Bill-Gray/PDCursesMod/issues/197 * Once the fix is released upstream and into MSYS, we should probably bump our minimal required PDCursesMod version. The color-table workaround (cf9ffc0cec0d2e55930238d1752209bca659c96d) can then also be removed. * We should also consider dropping official support for the classic PDCurses and support only PDCursesMod - this will allow us to simplify interfaces-curses/interface.c a bit. Support for classic PDCurses is probably broken by now anyway and trying to support it is just too much. --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3f50576..0ad8594 100644 --- a/configure.ac +++ b/configure.ac @@ -298,6 +298,13 @@ case $INTERFACE in AC_DEFINE(PDC_FORCE_UTF8, 1, [PDCursesMod forces use of UTF8]) ]) + # This is actually a symbol (CRITICAL_SECTION) used by PDCursesMod/WinGUI + # for synchronization. We use this as a workaround to gain responsiveness + # while polling for keypresses. + # NOTE: Can currently only be detected when linking against the static + # libpdcurses_wingui.a. + AC_CHECK_FUNCS([PDC_cs]) + # This is detectable at runtime on PDCursesMod using PDC_get_version(). # "Classic" PDCurses however does not allow runtime or compile-time checks for # discerning eg. WinCon from SDL. -- cgit v1.2.3