From a7f2415469593269cc2efda824106cf4d166f291 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Fri, 3 Apr 2020 09:57:54 -0500 Subject: [PATCH] libretro: Fix Android builds Text Drawer functionality is not available in libretro as it depends on standalone jni calls. InputBox is also standalone only gui functionality. --- ext/native/gfx_es2/draw_text.cpp | 4 +++- ext/native/gfx_es2/draw_text_android.cpp | 2 +- libretro/libretro.cpp | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ext/native/gfx_es2/draw_text.cpp b/ext/native/gfx_es2/draw_text.cpp index ce9b51b379..4463bdbb55 100644 --- a/ext/native/gfx_es2/draw_text.cpp +++ b/ext/native/gfx_es2/draw_text.cpp @@ -81,7 +81,9 @@ void TextDrawer::DrawStringBitmapRect(std::vector &bitmapData, TextStri TextDrawer *TextDrawer::Create(Draw::DrawContext *draw) { TextDrawer *drawer = nullptr; -#if defined(_WIN32) && !PPSSPP_PLATFORM(UWP) +#if defined(__LIBRETRO__) + // No text drawer +#elif defined(_WIN32) && !PPSSPP_PLATFORM(UWP) drawer = new TextDrawerWin32(draw); #elif PPSSPP_PLATFORM(UWP) drawer = new TextDrawerUWP(draw); diff --git a/ext/native/gfx_es2/draw_text_android.cpp b/ext/native/gfx_es2/draw_text_android.cpp index f2513b99e3..fe9cd14fdd 100644 --- a/ext/native/gfx_es2/draw_text_android.cpp +++ b/ext/native/gfx_es2/draw_text_android.cpp @@ -11,7 +11,7 @@ #include "android/jni/app-android.h" #include -#if PPSSPP_PLATFORM(ANDROID) +#if PPSSPP_PLATFORM(ANDROID) && !defined(__LIBRETRO__) #include diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index 45185748ca..ea277d64b6 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -809,4 +809,8 @@ bool System_InputBoxGetWString(const wchar_t *title, const std::wstring &default #if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS) std::vector __cameraGetDeviceList() { return std::vector(); } + +void System_InputBoxGetString(const std::string &title, const std::string &defaultValue, std::function cb) { + cb(false, ""); +} #endif