From 5e976ff842db210826e27af8fd21eb230d0b773e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 29 Sep 2020 18:36:59 +0200 Subject: [PATCH] Buildfixes --- Common/FileUtil.cpp | 2 +- Common/SysError.cpp | 2 ++ Core/MIPS/ARM/ArmCompALU.cpp | 2 ++ ext/native/file/file_util.cpp | 2 +- ext/native/gfx_es2/draw_buffer.h | 6 ------ ext/native/gfx_es2/draw_text_android.cpp | 1 + ext/native/gfx_es2/draw_text_uwp.cpp | 1 + ext/native/math/expression_parser.cpp | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Common/FileUtil.cpp b/Common/FileUtil.cpp index 185e970d93..d99be4d46a 100644 --- a/Common/FileUtil.cpp +++ b/Common/FileUtil.cpp @@ -802,7 +802,7 @@ const std::string &GetExeDirectory() sz = GetModuleFileName(nullptr, &program_path[0], (DWORD)program_path.size()); } while (sz >= program_path.size()); - TCHAR *last_slash = _tcsrchr(&program_path[0], '\\'); + const wchar_t *last_slash = wcsrchr(&program_path[0], '\\'); if (last_slash != nullptr) program_path.resize(last_slash - &program_path[0] + 1); else diff --git a/Common/SysError.cpp b/Common/SysError.cpp index c3f900ed67..841655bfbe 100644 --- a/Common/SysError.cpp +++ b/Common/SysError.cpp @@ -23,6 +23,8 @@ #ifdef _WIN32 #include "CommonWindows.h" +#else +#include #endif // Generic function to get last error message. diff --git a/Core/MIPS/ARM/ArmCompALU.cpp b/Core/MIPS/ARM/ArmCompALU.cpp index 66d12ed8a9..67e5a70600 100644 --- a/Core/MIPS/ARM/ArmCompALU.cpp +++ b/Core/MIPS/ARM/ArmCompALU.cpp @@ -19,11 +19,13 @@ #if PPSSPP_ARCH(ARM) #include + #include "Core/MIPS/MIPS.h" #include "Core/MIPS/MIPSCodeUtils.h" #include "Core/MIPS/ARM/ArmJit.h" #include "Core/MIPS/ARM/ArmRegCache.h" #include "Common/CPUDetect.h" +#include "Common/ByteSwap.h" using namespace MIPSAnalyst; diff --git a/ext/native/file/file_util.cpp b/ext/native/file/file_util.cpp index bc677e65c0..56f211bd57 100644 --- a/ext/native/file/file_util.cpp +++ b/ext/native/file/file_util.cpp @@ -318,7 +318,7 @@ std::vector getWindowsDrives() std::vector drives; const DWORD buffsize = GetLogicalDriveStrings(0, NULL); - std::vector buff(buffsize); + std::vector buff(buffsize); if (GetLogicalDriveStrings(buffsize, buff.data()) == buffsize - 1) { auto drive = buff.data(); diff --git a/ext/native/gfx_es2/draw_buffer.h b/ext/native/gfx_es2/draw_buffer.h index 9b1e5d7e8d..001a91cd57 100644 --- a/ext/native/gfx_es2/draw_buffer.h +++ b/ext/native/gfx_es2/draw_buffer.h @@ -46,11 +46,6 @@ namespace Draw { class Pipeline; } -enum DrawBufferPrimitiveMode { - DBMODE_NORMAL = 0, - DBMODE_LINES = 1 -}; - struct GradientStop { float t; uint32_t color; @@ -190,7 +185,6 @@ private: Vertex *verts_; int count_; - DrawBufferPrimitiveMode mode_; const Atlas *atlas; bool inited_; diff --git a/ext/native/gfx_es2/draw_text_android.cpp b/ext/native/gfx_es2/draw_text_android.cpp index dc1ec66f8a..8a61ce8cb2 100644 --- a/ext/native/gfx_es2/draw_text_android.cpp +++ b/ext/native/gfx_es2/draw_text_android.cpp @@ -9,6 +9,7 @@ #include "android/jni/app-android.h" #include "Common/Log.h" +#include "Common/StringUtils.h" #if PPSSPP_PLATFORM(ANDROID) && !defined(__LIBRETRO__) diff --git a/ext/native/gfx_es2/draw_text_uwp.cpp b/ext/native/gfx_es2/draw_text_uwp.cpp index b58af57ae2..3968767ee3 100644 --- a/ext/native/gfx_es2/draw_text_uwp.cpp +++ b/ext/native/gfx_es2/draw_text_uwp.cpp @@ -7,6 +7,7 @@ #include "gfx_es2/draw_text_uwp.h" #include "Common/Log.h" +#include "Common/StringUtils.h" #if PPSSPP_PLATFORM(UWP) diff --git a/ext/native/math/expression_parser.cpp b/ext/native/math/expression_parser.cpp index 5d71182242..2c277c000a 100644 --- a/ext/native/math/expression_parser.cpp +++ b/ext/native/math/expression_parser.cpp @@ -458,11 +458,11 @@ bool parsePostfixExpression(PostfixExpression& exp, IExpressionFunctions* funcs, valueStack.push_back(val); } break; - case EXOP_SIGNPLUS: // keine aktion nötig + case EXOP_SIGNPLUS: // keine aktion nötig break; case EXOP_SIGNMINUS: // -0 if (useFloat) - valueStack.push_back(0.0-fArg[0]); + valueStack.push_back(0.0 - fArg[0]); else valueStack.push_back(0-arg[0]); break;