From a7c138c13d29f6e28cb85f387df70fb8ad5355d6 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Wed, 7 Aug 2019 14:54:11 -0230 Subject: [PATCH] libretro: fix compile errors. --- src/common/PJoystickHandler.cxx | 4 ++-- src/emucore/FBSurface.cxx | 9 ++++----- src/libretro/Makefile.common | 1 + 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/PJoystickHandler.cxx b/src/common/PJoystickHandler.cxx index a2bfb94db..a5cf2616e 100644 --- a/src/common/PJoystickHandler.cxx +++ b/src/common/PJoystickHandler.cxx @@ -490,7 +490,7 @@ void PhysicalJoystickHandler::eraseMapping(Event::Type event, EventMode mode) stick.second->eraseMap(kCommonMode); stick.second->eraseMap(kJoystickMode); stick.second->eraseMap(kPaddlesMode); - stick.second->eraseMap(kKeypadMode); + stick.second->eraseMap(kKeypadMode); } } } @@ -729,8 +729,8 @@ void PhysicalJoystickHandler::handleHatEvent(int stick, int hat, int value) myHandler.overlay().handleJoyHatEvent(stick, hat, JoyHat::LEFT, button); } } - } #endif + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/FBSurface.cxx b/src/emucore/FBSurface.cxx index 1edb85c2d..83069309e 100644 --- a/src/emucore/FBSurface.cxx +++ b/src/emucore/FBSurface.cxx @@ -312,9 +312,7 @@ void FBSurface::frameRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void FBSurface::wrapString(const string inStr, int pos, string& leftStr, string& rightStr) const { - int i; - - for(i = pos; i > 0; --i) + for(int i = pos; i > 0; --i) { if(isWhiteSpace(inStr[i])) { @@ -333,9 +331,8 @@ void FBSurface::wrapString(const string inStr, int pos, string& leftStr, string& bool FBSurface::isWhiteSpace(const char s) const { const string WHITESPACES = " ,.;:+-"; - int i; - for(i = 0; i < WHITESPACES.length(); ++i) + for(size_t i = 0; i < WHITESPACES.length(); ++i) if(s == WHITESPACES[i]) return true; @@ -348,6 +345,7 @@ void FBSurface::drawString(const GUI::Font& font, const string& s, ColorId color, TextAlign align, int deltax, bool useEllipsis, ColorId shadowColor) { +#ifdef GUI_SUPPORT string inStr = s; // draw multiline string @@ -375,6 +373,7 @@ void FBSurface::drawString(const GUI::Font& font, const string& s, inStr = rightStr; } drawString(font, inStr, x, y, w, color, align, deltax, useEllipsis, shadowColor); +#endif } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/libretro/Makefile.common b/src/libretro/Makefile.common index bad5e8682..1f6eb407f 100644 --- a/src/libretro/Makefile.common +++ b/src/libretro/Makefile.common @@ -19,6 +19,7 @@ SOURCES_CXX := \ $(CORE_DIR)/common/Base.cxx \ $(CORE_DIR)/common/FpsMeter.cxx \ $(CORE_DIR)/common/FSNodeZIP.cxx \ + $(CORE_DIR)/common/JoyMap.cxx \ $(CORE_DIR)/common/KeyMap.cxx \ $(CORE_DIR)/common/Logger.cxx \ $(CORE_DIR)/common/MouseControl.cxx \