From 162667a9a61995972198e483126edae2698189cc Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Fri, 3 Feb 2023 02:22:46 -0500 Subject: [PATCH] Fix non QT builds & Add support for Termux --- src/include/86box/plat_dir.h | 4 ++-- src/unix/unix.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/86box/plat_dir.h b/src/include/86box/plat_dir.h index f6c135001..d55bc5046 100644 --- a/src/include/86box/plat_dir.h +++ b/src/include/86box/plat_dir.h @@ -18,8 +18,8 @@ #ifndef PLAT_DIR_H #define PLAT_DIR_H -/* Windows needs the POSIX re-implementations */ -#if defined(_WIN32) +/* Windows and Termux needs the POSIX re-implementations */ +#if defined(_WIN32) || defined(__TERMUX__) # ifdef _MAX_FNAME # define MAXNAMLEN _MAX_FNAME # else diff --git a/src/unix/unix.c b/src/unix/unix.c index 296da5e14..b9e842280 100644 --- a/src/unix/unix.c +++ b/src/unix/unix.c @@ -624,11 +624,11 @@ ui_msgbox_header(int flags, void *header, void *message) SDL_MessageBoxData msgdata; SDL_MessageBoxButtonData msgbtn; if (!header) - header = (flags & MBX_ANSI) ? "86Box" : L"86Box"; + header = (void *) (flags & MBX_ANSI) ? "86Box" : L"86Box"; if (header <= (void *) 7168) - header = plat_get_string(header); + header = (void *) plat_get_string((int) header); if (message <= (void *) 7168) - message = plat_get_string(message); + message = (void *) plat_get_string((int) message); msgbtn.buttonid = 1; msgbtn.text = "OK"; msgbtn.flags = 0;