From 5e185f3d871b48c823d3fc994ba6f1203ed50b30 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Jan 2022 15:11:57 -0800 Subject: [PATCH 1/4] Common: Remove some unused files. --- Common/ArmABI.cpp | 128 ---------------------------------------------- Common/ArmABI.h | 36 ------------- 2 files changed, 164 deletions(-) delete mode 100644 Common/ArmABI.cpp delete mode 100644 Common/ArmABI.h diff --git a/Common/ArmABI.cpp b/Common/ArmABI.cpp deleted file mode 100644 index af74470e37..0000000000 --- a/Common/ArmABI.cpp +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#include "ppsspp_config.h" - -#if PPSSPP_ARCH(ARM) - -#include "ArmEmitter.h" -#include "ArmABI.h" - -using namespace ArmGen; -// If passing arguments, don't use this. -void ARMXEmitter::ARMABI_CallFunction(void *func) -{ - PUSH(5, R0, R1, R2, R3, _LR); - ARMABI_MOVI2R(R14, (u32)func); - BL(R14); - POP(5, R0, R1, R2, R3, _LR); -} -void ARMXEmitter::ARMABI_CallFunctionC(void *func, u32 Arg) -{ - PUSH(5, R0, R1, R2, R3, _LR); - ARMABI_MOVI2R(R14, (u32)func); - ARMABI_MOVI2R(R0, Arg); - BL(R14); - POP(5, R0, R1, R2, R3, _LR); -} - -void ARMXEmitter::ARMABI_CallFunctionCNoSave(void *func, u32 Arg) -{ - PUSH(1, _LR); - ARMABI_MOVI2R(R14, (u32)func); - ARMABI_MOVI2R(R0, Arg); - BL(R14); - POP(1, _LR); -} - -void ARMXEmitter::ARMABI_CallFunctionCC(void *func, u32 Arg1, u32 Arg2) -{ - PUSH(5, R0, R1, R2, R3, _LR); - ARMABI_MOVI2R(R14, (u32)func); - ARMABI_MOVI2R(R0, Arg1); - ARMABI_MOVI2R(R1, Arg2); - BL(R14); - POP(5, R0, R1, R2, R3, _LR); - -} -void ARMXEmitter::ARMABI_CallFunctionCCC(void *func, u32 Arg1, u32 Arg2, u32 Arg3) -{ - PUSH(5, R0, R1, R2, R3, _LR); - ARMABI_MOVI2R(R14, (u32)func); - ARMABI_MOVI2R(R0, Arg1); - ARMABI_MOVI2R(R1, Arg2); - ARMABI_MOVI2R(R2, Arg3); - BL(R14); - POP(5, R0, R1, R2, R3, _LR); -} - -void ARMXEmitter::ARMABI_PushAllCalleeSavedRegsAndAdjustStack() { - // Note: 4 * 4 = 16 bytes, so alignment is preserved. - PUSH(4, R0, R1, R2, R3); -} - -void ARMXEmitter::ARMABI_PopAllCalleeSavedRegsAndAdjustStack() { - POP(4, R0, R1, R2, R3); -} - -const char *conditions[] = {"EQ", "NEQ", "CS", "CC", "MI", "PL", "VS", "VC", "HI", "LS", "GE", "LT", "GT", "LE", "AL" }; -static void ShowCondition(u32 cond) -{ - printf("Condition: %s[%d]\n", conditions[cond], (int)cond); -} -void ARMXEmitter::ARMABI_ShowConditions() -{ - const u8 *ptr = GetCodePtr(); - FixupBranch cc[15]; - for(u32 a = 0; a < 15; ++a) - cc[a] = B_CC((CCFlags)a); - - for(u32 a = 0; a < 15; ++a) - { - SetJumpTarget(cc[a]); - ARMABI_CallFunctionC((void*)&ShowCondition, a); - if(a != 14) - B(ptr + ((a + 1) * 4)); - } -} -// NZCVQ is stored in the lower five bits of the Flags variable -// GE values are in the lower four bits of the GEval variable - -void ARMXEmitter::UpdateAPSR(bool NZCVQ, u8 Flags, bool GE, u8 GEval) -{ - if(NZCVQ && GE) - { - // Can't update GE with the other ones with a immediate - // Got to use a scratch register - u32 Imm = (Flags << 27) | ((GEval & 0xF) << 16); - ARMABI_MOVI2R(R14, Imm); - _MSR(true, true, R14); - } - else { - if (NZCVQ) - { - Operand2 value(Flags << 1, 3); - _MSR(true, false, value); - } else if (GE) - { - Operand2 value(GEval << 2, 9); - _MSR(false, true, value); - } - } -} - -#endif \ No newline at end of file diff --git a/Common/ArmABI.h b/Common/ArmABI.h deleted file mode 100644 index 5f27879700..0000000000 --- a/Common/ArmABI.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#ifndef _JIT_ARMABI_H_ -#define _JIT_ARMABI_H_ - -#include "Common.h" - -// I've been using R8 as a trash register, I don't know if I should choose a -// better register or statically allocate some later, for now I'll just thrash -// R8 and down the road think about the other ones. -// TODO: Look at what all registers are being used for. - -// ARMv7 uses registers for arguments to instructions -// R0 is also used for returns from instructions -// R1 is used as return along with R0 if it is a double size - -#define ARM_PARAM1 R0 -#define ARM_PARAM2 R1 -#define ARM_PARAM3 R2 -#define ARM_PARAM4 R3 -#endif From 3df6cb704f680d2fcff369cbdf2fad609e8559eb Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Jan 2022 15:15:38 -0800 Subject: [PATCH 2/4] Global: Fix some type conversion warnings. Hidden by some warning disables. --- Common/Arm64Emitter.cpp | 6 +++--- Common/File/FileDescriptor.cpp | 4 ++-- Common/Math/curves.cpp | 2 +- Common/Render/DrawBuffer.cpp | 2 +- Core/Core.cpp | 4 ++-- Core/FileLoaders/DiskCachingFileLoader.cpp | 4 ++-- Core/HW/Display.cpp | 16 ++++++++-------- Core/HW/SasAudio.h | 2 +- Core/MIPS/JitCommon/JitBlockCache.cpp | 8 ++++---- Core/MIPS/MIPSIntVFPU.cpp | 2 +- Core/MIPS/MIPSVFPUUtils.cpp | 2 +- Core/MIPS/MIPSVFPUUtils.h | 2 +- Core/MIPS/x86/Asm.cpp | 8 +++++--- Core/MemFault.cpp | 4 ++-- Core/Util/DisArm64.cpp | 6 +++--- android/jni/TestRunner.cpp | 2 +- headless/Headless.cpp | 4 ++-- unittest/TestX64Emitter.cpp | 2 +- 18 files changed, 41 insertions(+), 39 deletions(-) diff --git a/Common/Arm64Emitter.cpp b/Common/Arm64Emitter.cpp index ec6e0ef61c..ce047cd41d 100644 --- a/Common/Arm64Emitter.cpp +++ b/Common/Arm64Emitter.cpp @@ -53,11 +53,11 @@ bool IsPowerOfTwo(uint64_t x) { bool IsImmArithmetic(uint64_t input, u32 *val, bool *shift) { if (input < 4096) { - if (val) *val = input; + if (val) *val = (uint32_t)input; if (shift) *shift = false; return true; } else if ((input & 0xFFF000) == input) { - if (val) *val = input >> 12; + if (val) *val = (uint32_t)(input >> 12); if (shift) *shift = true; return true; } @@ -1963,7 +1963,7 @@ void ARM64XEmitter::MOVI2R(ARM64Reg Rd, u64 imm, bool optimize) // TODO: Make some more systemic use of MOVN, but this will take care of most cases. // Small negative integer. Use MOVN if (!Is64Bit(Rd) && (imm | 0xFFFF0000) == imm) { - MOVN(Rd, ~imm, SHIFT_0); + MOVN(Rd, (u32)(~imm), SHIFT_0); return; } diff --git a/Common/File/FileDescriptor.cpp b/Common/File/FileDescriptor.cpp index 139e394c41..480bdf31b8 100644 --- a/Common/File/FileDescriptor.cpp +++ b/Common/File/FileDescriptor.cpp @@ -83,8 +83,8 @@ size_t Write(int fd, const std::string &str) { bool WaitUntilReady(int fd, double timeout, bool for_write) { struct timeval tv; - tv.tv_sec = floor(timeout); - tv.tv_usec = (timeout - floor(timeout)) * 1000000.0; + tv.tv_sec = (long)floor(timeout); + tv.tv_usec = (long)((timeout - floor(timeout)) * 1000000.0); fd_set fds; FD_ZERO(&fds); diff --git a/Common/Math/curves.cpp b/Common/Math/curves.cpp index 2488ba5c30..099327c6c1 100644 --- a/Common/Math/curves.cpp +++ b/Common/Math/curves.cpp @@ -37,7 +37,7 @@ float linearOut(int t, int fadeOutLength) { float ease(float val) { if (val > 1.0f) return 1.0f; if (val < 0.0f) return 0.0f; - return ((-cosf(val * PI)) + 1.0f) * 0.5; + return (float)(((-cosf(val * PI)) + 1.0f) * 0.5); } float ease(int t, int fadeLength) diff --git a/Common/Render/DrawBuffer.cpp b/Common/Render/DrawBuffer.cpp index 92ee2d057d..1881fcddb6 100644 --- a/Common/Render/DrawBuffer.cpp +++ b/Common/Render/DrawBuffer.cpp @@ -148,7 +148,7 @@ void DrawBuffer::RectOutline(float x, float y, float w, float h, uint32_t color, void DrawBuffer::MultiVGradient(float x, float y, float w, float h, GradientStop *stops, int numStops) { for (int i = 0; i < numStops - 1; i++) { float t0 = stops[i].t, t1 = stops[i+1].t; - uint32_t c0 = stops[i].t, c1 = stops[i+1].t; + uint32_t c0 = stops[i].color, c1 = stops[i+1].color; RectVGradient(x, y + h * t0, w, h * (t1 - t0), c0, c1); } } diff --git a/Core/Core.cpp b/Core/Core.cpp index 56e113b75c..5fb5357352 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -188,8 +188,8 @@ bool UpdateScreenScale(int width, int height) { pixel_in_dps_x = 1.0f / g_dpi_scale_x; pixel_in_dps_y = 1.0f / g_dpi_scale_y; - int new_dp_xres = width * g_dpi_scale_x; - int new_dp_yres = height * g_dpi_scale_y; + int new_dp_xres = (int)(width * g_dpi_scale_x); + int new_dp_yres = (int)(height * g_dpi_scale_y); bool dp_changed = new_dp_xres != dp_xres || new_dp_yres != dp_yres; bool px_changed = pixel_xres != width || pixel_yres != height; diff --git a/Core/FileLoaders/DiskCachingFileLoader.cpp b/Core/FileLoaders/DiskCachingFileLoader.cpp index 73ba1ca868..ac3fdbd694 100644 --- a/Core/FileLoaders/DiskCachingFileLoader.cpp +++ b/Core/FileLoaders/DiskCachingFileLoader.cpp @@ -780,12 +780,12 @@ u32 DiskCachingFileLoaderCache::DetermineMaxBlocks() { } // This might be smaller than what's free, but if they try to launch a second game, // they'll be happier when it can be cached too. - return freeBlocksWithFlex; + return (u32)freeBlocksWithFlex; } // Might be lower than LOWER_BOUND, but that's okay. That means not enough space. // We abandon the idea of flex since there's not enough space free anyway. - return freeBlocks; + return (u32)freeBlocks; } u32 DiskCachingFileLoaderCache::CountCachedFiles() { diff --git a/Core/HW/Display.cpp b/Core/HW/Display.cpp index 1335593cd4..cf28654074 100644 --- a/Core/HW/Display.cpp +++ b/Core/HW/Display.cpp @@ -75,10 +75,10 @@ static void CalculateFPS() { if (now >= lastFpsTime + 1.0) { double frames = (numVBlanks - lastFpsFrame); - actualFps = (actualFlips - lastActualFlips); + actualFps = (float)(actualFlips - lastActualFlips); fps = frames / (now - lastFpsTime); - flips = 60.0 * (double)(gpuStats.numFlips - lastNumFlips) / frames; + flips = (float)(60.0 * (double)(gpuStats.numFlips - lastNumFlips) / frames); lastFpsFrame = numVBlanks; lastNumFlips = gpuStats.numFlips; @@ -105,17 +105,17 @@ static void CalculateFPS() { // TODO: Also average actualFps void __DisplayGetFPS(float *out_vps, float *out_fps, float *out_actual_fps) { - *out_vps = fps; + *out_vps = (float)fps; *out_fps = flips; *out_actual_fps = actualFps; } void __DisplayGetVPS(float *out_vps) { - *out_vps = fps; + *out_vps = (float)fps; } void __DisplayGetAveragedFPS(float *out_vps, float *out_fps) { - float avg = 0.0; + double avg = 0.0; if (fpsHistoryValid > 0) { for (int i = 0; i < fpsHistoryValid; ++i) { avg += fpsHistory[i]; @@ -123,7 +123,7 @@ void __DisplayGetAveragedFPS(float *out_vps, float *out_fps) { avg /= (double)fpsHistoryValid; } - *out_vps = *out_fps = avg; + *out_vps = *out_fps = (float)avg; } int __DisplayGetFlipCount() { @@ -147,7 +147,7 @@ uint64_t DisplayFrameStartTicks() { } uint32_t __DisplayGetCurrentHcount() { - const int ticksIntoFrame = CoreTiming::GetTicks() - frameStartTicks; + const int ticksIntoFrame = (int)(CoreTiming::GetTicks() - frameStartTicks); const int ticksPerVblank = CoreTiming::GetClockFrequencyHz() / 60 / hCountPerVblank; // Can't seem to produce a 0 on real hardware, offsetting by 1 makes things look right. return 1 + (ticksIntoFrame / ticksPerVblank); @@ -279,7 +279,7 @@ int DisplayCalculateFrameSkip() { int frameSkipNum; if (g_Config.iFrameSkipType == 1) { // Calculate the frames to skip dynamically using the set percentage of the current fps - frameSkipNum = ceil(flips * (static_cast(g_Config.iFrameSkip) / 100.00)); + frameSkipNum = (int)ceil(flips * (static_cast(g_Config.iFrameSkip) / 100.00)); } else { // Use the set number of frames to skip frameSkipNum = g_Config.iFrameSkip; diff --git a/Core/HW/SasAudio.h b/Core/HW/SasAudio.h index de883afa36..9a2deca577 100644 --- a/Core/HW/SasAudio.h +++ b/Core/HW/SasAudio.h @@ -161,7 +161,7 @@ public: inline void Step(); int GetHeight() const { - return height_ > (s64)PSP_SAS_ENVELOPE_HEIGHT_MAX ? PSP_SAS_ENVELOPE_HEIGHT_MAX : height_; + return (int)(height_ > (s64)PSP_SAS_ENVELOPE_HEIGHT_MAX ? PSP_SAS_ENVELOPE_HEIGHT_MAX : height_); } bool NeedsKeyOn() const { return state_ == STATE_KEYON; diff --git a/Core/MIPS/JitCommon/JitBlockCache.cpp b/Core/MIPS/JitCommon/JitBlockCache.cpp index 7a0e3179f2..87e75c397c 100644 --- a/Core/MIPS/JitCommon/JitBlockCache.cpp +++ b/Core/MIPS/JitCommon/JitBlockCache.cpp @@ -656,12 +656,12 @@ void JitBlockCache::ComputeStats(BlockCacheStats &bcStats) const { bcStats.maxBloatBlock = b->originalAddress; } totalBloat += bloat; - bcStats.bloatMap[bloat] = b->originalAddress; + bcStats.bloatMap[(float)bloat] = b->originalAddress; } bcStats.numBlocks = num_blocks_; - bcStats.minBloat = minBloat; - bcStats.maxBloat = maxBloat; - bcStats.avgBloat = totalBloat / (double)num_blocks_; + bcStats.minBloat = (float)minBloat; + bcStats.maxBloat = (float)maxBloat; + bcStats.avgBloat = (float)(totalBloat / (double)num_blocks_); } JitBlockDebugInfo JitBlockCache::GetBlockDebugInfo(int blockNum) const { diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index 1266efbc68..8f761b858d 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -634,7 +634,7 @@ namespace MIPSInt case 20: d[i] = powf(2.0f, s[i]); break; //vexp2 case 21: d[i] = logf(s[i])/log(2.0f); break; //vlog2 case 22: d[i] = USE_VPFU_SQRT ? vfpu_sqrt(s[i]) : fabsf(sqrtf(s[i])); break; //vsqrt - case 23: d[i] = asinf(s[i]) / M_PI_2; break; //vasin + case 23: d[i] = (float)(asinf(s[i]) / M_PI_2); break; //vasin case 24: d[i] = -1.0f / s[i]; break; // vnrcp case 26: { d[i] = -vfpu_sin(s[i]); } break; // vnsin case 28: d[i] = 1.0f / powf(2.0, s[i]); break; // vrexp2 diff --git a/Core/MIPS/MIPSVFPUUtils.cpp b/Core/MIPS/MIPSVFPUUtils.cpp index ab058bd935..0f1d6688ab 100644 --- a/Core/MIPS/MIPSVFPUUtils.cpp +++ b/Core/MIPS/MIPSVFPUUtils.cpp @@ -832,7 +832,7 @@ static inline uint32_t mant_mul(uint32_t a, uint32_t b) { if (m & 0x007FFFFF) { m += 0x01437000; } - return m >> 23; + return (uint32_t)(m >> 23); } float vfpu_rsqrt(float a) { diff --git a/Core/MIPS/MIPSVFPUUtils.h b/Core/MIPS/MIPSVFPUUtils.h index 8200e8c87d..df1a1b85b0 100644 --- a/Core/MIPS/MIPSVFPUUtils.h +++ b/Core/MIPS/MIPSVFPUUtils.h @@ -55,7 +55,7 @@ extern float vfpu_cos(float); extern void vfpu_sincos(float, float&, float&); inline float vfpu_asin(float angle) { - return asinf(angle) / M_PI_2; + return (float)(asinf(angle) / M_PI_2); } inline float vfpu_clamp(float v, float min, float max) { diff --git a/Core/MIPS/x86/Asm.cpp b/Core/MIPS/x86/Asm.cpp index 03ce2ab7f1..fef6f0487c 100644 --- a/Core/MIPS/x86/Asm.cpp +++ b/Core/MIPS/x86/Asm.cpp @@ -181,10 +181,12 @@ void Jit::GenerateFixedCode(JitOptions &jo) { #if PPSSPP_ARCH(X86) ADD(32, R(EAX), ImmPtr(GetBasePtr())); #elif PPSSPP_ARCH(AMD64) - if (jo.reserveR15ForAsm) + if (jo.reserveR15ForAsm) { ADD(64, R(RAX), R(JITBASEREG)); - else - ADD(64, R(EAX), Imm32(jitbase)); + } else { + // See above, reserveR15ForAsm is used when above 0x7FFFFFFF. + ADD(64, R(EAX), Imm32((u32)jitbase)); + } #endif JMPptr(R(EAX)); SetJumpTarget(notfound); diff --git a/Core/MemFault.cpp b/Core/MemFault.cpp index e7c58c5705..a55dda88f1 100644 --- a/Core/MemFault.cpp +++ b/Core/MemFault.cpp @@ -118,7 +118,7 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) { // OK, a guest executable did a bad access. Take care of it. - uint32_t guestAddress = hostAddress - baseAddress; + uint32_t guestAddress = (uint32_t)(hostAddress - baseAddress); // TODO: Share the struct between the various analyzers, that will allow us to share most of // the implementations here. @@ -173,7 +173,7 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) { // TODO: Do the other archs and platforms. #if PPSSPP_ARCH(AMD64) && PPSSPP_PLATFORM(WINDOWS) // We know which register the address is in, look in Asm.cpp. - targetAddr = context->Rax; + targetAddr = (uint32_t)context->Rax; #endif Core_ExecException(targetAddr, currentMIPS->pc, ExecExceptionType::JUMP); // Redirect execution to a crash handler that will switch to CoreState::CORE_RUNTIME_ERROR immediately. diff --git a/Core/Util/DisArm64.cpp b/Core/Util/DisArm64.cpp index b03fc0d111..eac1edaed5 100644 --- a/Core/Util/DisArm64.cpp +++ b/Core/Util/DisArm64.cpp @@ -120,14 +120,14 @@ void DecodeBitMasks(int immN, int imms, int immr, uint64_t *tmask, uint64_t *wma // if len < 1 then ReservedValue(); // assert M >= (1 << len); // Determine S, R and S - R parameters - int levels = Ones(len); + int levels = (int)Ones(len); uint32_t S = imms & levels; uint32_t R = immr & levels; int diff = S - R; // 6-bit subtract with borrow int esize = 1 << len; int d = diff & Ones(len - 1); - uint32_t welem = Ones(S + 1); - uint32_t telem = Ones(d + 1); + uint32_t welem = (uint32_t)Ones(S + 1); + uint32_t telem = (uint32_t)Ones(d + 1); if (wmask) { uint64_t rotated = ROR(welem, R, esize); *wmask = Replicate(rotated, esize); diff --git a/android/jni/TestRunner.cpp b/android/jni/TestRunner.cpp index 6e9c3b792b..d032a9db75 100644 --- a/android/jni/TestRunner.cpp +++ b/android/jni/TestRunner.cpp @@ -129,7 +129,7 @@ bool RunTests() { // Run the emu until the test exits INFO_LOG(SYSTEM, "Test: Entering runloop."); while (true) { - int blockTicks = usToCycles(1000000 / 10); + int blockTicks = (int)usToCycles(1000000 / 10); while (coreState == CORE_RUNNING) { PSP_RunLoopFor(blockTicks); } diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 22beaa129a..c33609db3d 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -202,7 +202,7 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool coreState = coreParameter.startBreak ? CORE_STEPPING : CORE_RUNNING; while (coreState == CORE_RUNNING || coreState == CORE_STEPPING) { - int blockTicks = usToCycles(1000000 / 10); + int blockTicks = (int)usToCycles(1000000 / 10); PSP_RunLoopFor(blockTicks); // If we were rendering, this might be a nice time to do something about it. @@ -319,7 +319,7 @@ int main(int argc, const char* argv[]) } else if (!strncmp(argv[i], "--screenshot=", strlen("--screenshot=")) && strlen(argv[i]) > strlen("--screenshot=")) screenshotFilename = argv[i] + strlen("--screenshot="); else if (!strncmp(argv[i], "--timeout=", strlen("--timeout=")) && strlen(argv[i]) > strlen("--timeout=")) - timeout = strtod(argv[i] + strlen("--timeout="), NULL); + timeout = (float)strtod(argv[i] + strlen("--timeout="), NULL); else if (!strncmp(argv[i], "--debugger=", strlen("--debugger=")) && strlen(argv[i]) > strlen("--debugger=")) debuggerPort = (int)strtoul(argv[i] + strlen("--debugger="), NULL, 10); else if (!strcmp(argv[i], "--teamcity")) diff --git a/unittest/TestX64Emitter.cpp b/unittest/TestX64Emitter.cpp index 5ca64f2c1b..c92b415d12 100644 --- a/unittest/TestX64Emitter.cpp +++ b/unittest/TestX64Emitter.cpp @@ -15,7 +15,7 @@ static const u8 *prevStart = NULL; bool CheckLast(Gen::XEmitter &emit, const char *comp) { - auto vec = DisassembleX86(prevStart, emit.GetCodePointer() - prevStart); + auto vec = DisassembleX86(prevStart, (int)(emit.GetCodePointer() - prevStart)); EXPECT_EQ_STR(vec[0], std::string(comp)); return true; } From 2479d5220209e9fad0dd0a62a704e5883721dd1c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Jan 2022 15:49:02 -0800 Subject: [PATCH 3/4] Global: Reduce includes of common headers. In many places, string, map, or Common.h were included but not needed. --- Common/ABI.h | 1 - Common/Arm64Emitter.h | 2 +- Common/ArmCPUDetect.cpp | 2 +- Common/ArmEmitter.h | 2 +- Common/ConsoleListener.cpp | 2 +- Common/Data/Collections/ConstMap.h | 2 ++ Common/Data/Convert/ColorConvNEON.cpp | 2 +- Common/Data/Format/JSONReader.cpp | 14 +++++++++++++- Common/Data/Format/JSONReader.h | 12 +----------- Common/Data/Format/RIFF.h | 1 - Common/Data/Text/I18n.h | 1 - Common/FakeCPUDetect.cpp | 2 +- Common/FakeEmitter.h | 3 +-- Common/File/FileDescriptor.cpp | 2 +- Common/File/FileUtil.h | 2 -- Common/File/PathBrowser.cpp | 1 + Common/GPU/OpenGL/GLSLProgram.h | 1 - Common/GPU/ShaderWriter.cpp | 1 + Common/GPU/ShaderWriter.h | 1 - Common/GPU/Vulkan/VulkanMemory.h | 1 - Common/GPU/Vulkan/VulkanProfiler.h | 1 - Common/Input/GestureDetector.h | 1 + Common/Input/InputState.h | 2 -- Common/Log.cpp | 2 +- Common/Math/curves.cpp | 2 -- Common/MemArena.h | 2 +- Common/MemArenaDarwin.cpp | 1 - Common/MemoryUtil.cpp | 2 +- Common/MipsCPUDetect.cpp | 2 +- Common/MipsEmitter.h | 3 +-- Common/Profiler/Profiler.cpp | 2 -- Common/StringUtils.cpp | 1 - Common/StringUtils.h | 4 ++-- Common/Thread/Promise.h | 1 - Common/Thunk.h | 4 ++-- Common/UI/UI.cpp | 4 ---- Common/x64Analyzer.h | 2 +- Common/x64Emitter.h | 2 +- Core/CoreParameter.h | 1 - Core/CoreTiming.cpp | 1 + Core/Debugger/WebSocket/GameSubscriber.cpp | 1 + Core/Dialog/PSPDialog.h | 1 - Core/Dialog/PSPGamedataInstallDialog.cpp | 2 +- Core/Dialog/PSPNetconfDialog.cpp | 5 ++--- Core/ELF/ElfTypes.h | 2 +- Core/ELF/PBPReader.h | 3 ++- Core/FileLoaders/DiskCachingFileLoader.h | 2 +- Core/FileLoaders/HTTPFileLoader.cpp | 1 - Core/FileSystems/ISOFileSystem.cpp | 1 - Core/HDRemaster.cpp | 2 +- Core/HLE/ReplaceTables.cpp | 2 +- Core/HLE/__sceAudio.cpp | 2 +- Core/HLE/proAdhoc.cpp | 2 ++ Core/HLE/proAdhoc.h | 6 +++--- Core/HLE/sceIo.h | 3 +-- Core/HLE/sceJpeg.cpp | 2 +- Core/HLE/sceKernel.h | 2 +- Core/HLE/sceMpeg.h | 2 +- Core/HLE/sceNetAdhoc.cpp | 1 + Core/HLE/sceRtc.h | 3 ++- Core/HLE/sceUtility.h | 3 --- Core/HW/Camera.h | 1 - Core/HW/Display.cpp | 2 +- Core/HW/MemoryStick.cpp | 1 + Core/HW/StereoResampler.cpp | 1 + Core/MIPS/IR/IRJit.cpp | 1 + Core/MIPS/IR/IRJit.h | 2 +- Core/MIPS/JitCommon/JitBlockCache.cpp | 2 +- Core/MIPS/JitCommon/JitCommon.h | 1 - Core/MIPS/JitCommon/JitState.h | 2 +- Core/MIPS/MIPS.cpp | 2 +- Core/MIPS/MIPS.h | 2 -- Core/MIPS/MIPSInt.cpp | 2 +- Core/MIPS/x86/CompALU.cpp | 2 +- Core/MIPS/x86/CompFPU.cpp | 2 +- Core/MemFault.cpp | 1 + Core/MemMap.h | 2 -- Core/MemMapFunctions.cpp | 2 +- Core/Replay.cpp | 2 +- Core/Replay.h | 1 - Core/TextureReplacer.h | 3 +-- Core/Util/AudioFormatNEON.cpp | 2 +- Core/Util/PPGeDraw.cpp | 1 + Core/Util/PPGeDraw.h | 2 +- Core/Util/PortManager.cpp | 1 + Core/WaveFile.cpp | 2 -- Core/WaveFile.h | 1 - GPU/Common/FramebufferManagerCommon.cpp | 2 +- GPU/Common/ReinterpretFramebuffer.cpp | 1 + GPU/Common/ReinterpretFramebuffer.h | 1 - GPU/Common/ShaderCommon.h | 1 - GPU/Common/ShaderId.h | 2 +- GPU/Common/SplineCommon.cpp | 5 ++--- GPU/Common/TextureCacheCommon.cpp | 1 + GPU/Common/TextureDecoder.cpp | 1 + GPU/Common/TextureScalerCommon.h | 2 -- GPU/Common/VertexDecoderCommon.cpp | 2 +- GPU/Common/VertexDecoderCommon.h | 2 +- GPU/D3D11/DepalettizeShaderD3D11.cpp | 2 +- GPU/D3D11/DrawEngineD3D11.h | 1 - GPU/D3D11/ShaderManagerD3D11.cpp | 2 +- GPU/D3D11/ShaderManagerD3D11.h | 2 +- GPU/Debugger/Breakpoints.cpp | 1 + GPU/Debugger/Playback.cpp | 3 ++- GPU/Debugger/Record.cpp | 2 +- GPU/Debugger/Record.h | 4 ++-- GPU/Directx9/FramebufferManagerDX9.cpp | 6 +++--- GPU/Directx9/ShaderManagerDX9.cpp | 2 +- GPU/Directx9/ShaderManagerDX9.h | 2 +- GPU/Directx9/TextureCacheDX9.h | 2 -- GPU/Directx9/TextureScalerDX9.cpp | 2 +- GPU/GLES/TextureCacheGLES.cpp | 1 + GPU/GLES/TextureCacheGLES.h | 2 -- GPU/GPUState.cpp | 6 +++--- GPU/GPUState.h | 2 +- GPU/Math3D.cpp | 3 ++- GPU/Software/BinManager.h | 1 - GPU/Software/DrawPixel.cpp | 1 + GPU/Software/Lighting.cpp | 1 + GPU/Software/Rasterizer.cpp | 1 + GPU/Software/Rasterizer.h | 1 - GPU/Software/RasterizerRectangle.cpp | 1 + GPU/Software/RasterizerRegCache.h | 1 + GPU/Software/Sampler.cpp | 1 + GPU/Software/TransformUnit.cpp | 1 + GPU/Vulkan/ShaderManagerVulkan.cpp | 2 +- GPU/Vulkan/StencilBufferVulkan.cpp | 1 + GPU/Vulkan/TextureCacheVulkan.h | 2 -- GPU/Vulkan/TextureScalerVulkan.cpp | 2 +- Qt/QtHost.cpp | 1 - Qt/mainwindow.h | 1 + SDL/SDLJoystick.h | 1 + UI/ComboKeyMappingScreen.h | 2 -- UI/DevScreens.cpp | 1 + UI/DevScreens.h | 2 -- UI/DiscordIntegration.cpp | 1 + UI/DiscordIntegration.h | 2 -- UI/DisplayLayoutScreen.cpp | 1 - UI/DisplayLayoutScreen.h | 1 - UI/GPUDriverTestScreen.cpp | 1 + UI/GPUDriverTestScreen.h | 1 - UI/RemoteISOScreen.cpp | 3 ++- UI/ReportScreen.cpp | 1 + UI/Store.cpp | 1 - UI/TiltAnalogSettingsScreen.h | 7 +++---- UI/TouchControlLayoutScreen.cpp | 2 +- UI/TouchControlLayoutScreen.h | 3 --- UWP/App.cpp | 1 + Windows/GEDebugger/SimpleGLWindow.cpp | 2 +- Windows/GEDebugger/TabState.cpp | 2 +- Windows/GEDebugger/TabVertices.cpp | 2 +- Windows/MainWindow.cpp | 1 - Windows/MainWindow.h | 1 - Windows/MainWindowMenu.cpp | 2 +- Windows/WASAPIStream.cpp | 1 + Windows/WindowsAudio.h | 1 - android/jni/AndroidEGLContext.cpp | 1 + android/jni/AndroidJavaGLContext.cpp | 1 + android/jni/AndroidJavaGLContext.h | 4 ---- android/jni/app-android.h | 1 - headless/SDLHeadlessHost.cpp | 8 +------- unittest/TestVertexJit.cpp | 2 +- 162 files changed, 144 insertions(+), 185 deletions(-) diff --git a/Common/ABI.h b/Common/ABI.h index 0782fea6de..6f74ceb045 100644 --- a/Common/ABI.h +++ b/Common/ABI.h @@ -18,7 +18,6 @@ #pragma once #include "ppsspp_config.h" -#include "Common.h" // x86/x64 ABI:s, and helpers to help follow them when JIT-ing code. // All convensions return values in EAX (+ possibly EDX). diff --git a/Common/Arm64Emitter.h b/Common/Arm64Emitter.h index e63052dcd8..66add4e269 100644 --- a/Common/Arm64Emitter.h +++ b/Common/Arm64Emitter.h @@ -9,7 +9,7 @@ #include "Common/ArmCommon.h" #include "Common/BitSet.h" #include "Common/CodeBlock.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #define DYNA_REC JIT diff --git a/Common/ArmCPUDetect.cpp b/Common/ArmCPUDetect.cpp index 46e3d50335..b9368ca021 100644 --- a/Common/ArmCPUDetect.cpp +++ b/Common/ArmCPUDetect.cpp @@ -28,7 +28,7 @@ #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/CPUDetect.h" #include "Common/StringUtils.h" #include "Common/File/FileUtil.h" diff --git a/Common/ArmEmitter.h b/Common/ArmEmitter.h index e3857de088..d71c1efdf2 100644 --- a/Common/ArmEmitter.h +++ b/Common/ArmEmitter.h @@ -20,7 +20,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Common/ArmCommon.h" #include "Common/CodeBlock.h" diff --git a/Common/ConsoleListener.cpp b/Common/ConsoleListener.cpp index 7a3ebd92d1..ea2d7b3679 100644 --- a/Common/ConsoleListener.cpp +++ b/Common/ConsoleListener.cpp @@ -34,7 +34,7 @@ #include "ppsspp_config.h" #include "Common/Thread/ThreadUtil.h" #include "Common/Data/Encoding/Utf8.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/ConsoleListener.h" #include "Common/StringUtils.h" diff --git a/Common/Data/Collections/ConstMap.h b/Common/Data/Collections/ConstMap.h index 422737c435..50a4d0b5c4 100644 --- a/Common/Data/Collections/ConstMap.h +++ b/Common/Data/Collections/ConstMap.h @@ -1,5 +1,7 @@ #pragma once +#include + template class InitConstMap { diff --git a/Common/Data/Convert/ColorConvNEON.cpp b/Common/Data/Convert/ColorConvNEON.cpp index 27c230448a..c071e34e44 100644 --- a/Common/Data/Convert/ColorConvNEON.cpp +++ b/Common/Data/Convert/ColorConvNEON.cpp @@ -24,7 +24,7 @@ #include #endif #include "Common/Data/Convert/ColorConvNEON.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/CPUDetect.h" // TODO: More NEON color conversion funcs. diff --git a/Common/Data/Format/JSONReader.cpp b/Common/Data/Format/JSONReader.cpp index 86c18df54c..9c2128e6ef 100644 --- a/Common/Data/Format/JSONReader.cpp +++ b/Common/Data/Format/JSONReader.cpp @@ -1,7 +1,8 @@ +#include "Common/Data/Format/JSONReader.h" #include "Common/File/VFS/VFS.h" #include "Common/File/Path.h" #include "Common/File/FileUtil.h" -#include "Common/Data/Format/JSONReader.h" +#include "Common/Log.h" namespace json { @@ -21,6 +22,17 @@ JsonReader::JsonReader(const std::string &filename) { } } +bool JsonReader::parse() { + char *error_pos; + int status = jsonParse(buffer_, &error_pos, &root_, alloc_); + if (status != JSON_OK) { + ERROR_LOG(IO, "Error at (%i): %s\n%s\n\n", (int)(error_pos - buffer_), jsonStrError(status), error_pos); + return false; + } + ok_ = true; + return true; +} + int JsonGet::numChildren() const { int count = 0; if (value_.getTag() == JSON_OBJECT || value_.getTag() == JSON_ARRAY) { diff --git a/Common/Data/Format/JSONReader.h b/Common/Data/Format/JSONReader.h index 60cc78cfb9..4156650301 100644 --- a/Common/Data/Format/JSONReader.h +++ b/Common/Data/Format/JSONReader.h @@ -4,7 +4,6 @@ #include "ext/gason/gason.h" #include "Common/Common.h" -#include "Common/Log.h" namespace json { @@ -69,16 +68,7 @@ public: const JsonValue rootValue() const { return root_; } private: - bool parse() { - char *error_pos; - int status = jsonParse(buffer_, &error_pos, &root_, alloc_); - if (status != JSON_OK) { - ERROR_LOG(IO, "Error at (%i): %s\n%s\n\n", (int)(error_pos - buffer_), jsonStrError(status), error_pos); - return false; - } - ok_ = true; - return true; - } + bool parse(); char *buffer_ = nullptr; JsonAllocator alloc_; diff --git a/Common/Data/Format/RIFF.h b/Common/Data/Format/RIFF.h index 0e0dbee623..79d1c567a6 100644 --- a/Common/Data/Format/RIFF.h +++ b/Common/Data/Format/RIFF.h @@ -9,7 +9,6 @@ // OR it contains ONLY other chunks // otherwise the scheme breaks. -#include #include class RIFFReader { diff --git a/Common/Data/Text/I18n.h b/Common/Data/Text/I18n.h index 50334fa1f6..54e1711317 100644 --- a/Common/Data/Text/I18n.h +++ b/Common/Data/Text/I18n.h @@ -12,7 +12,6 @@ #include #include #include -#include #include "Common/Common.h" #include "Common/File/Path.h" diff --git a/Common/FakeCPUDetect.cpp b/Common/FakeCPUDetect.cpp index 3bdaeabbcd..5845f29ae6 100644 --- a/Common/FakeCPUDetect.cpp +++ b/Common/FakeCPUDetect.cpp @@ -31,7 +31,7 @@ #include #include -#include "Common.h" +#include "Common/CommonTypes.h" #include "CPUDetect.h" #include "StringUtils.h" diff --git a/Common/FakeEmitter.h b/Common/FakeEmitter.h index 25954ee350..f1d7a3f584 100644 --- a/Common/FakeEmitter.h +++ b/Common/FakeEmitter.h @@ -20,10 +20,9 @@ #ifndef _DOLPHIN_FAKE_CODEGEN_ #define _DOLPHIN_FAKE_CODEGEN_ -#include #include -#include "Common.h" +#include "Common/CommonTypes.h" #include "Common/CodeBlock.h" // VCVT flags diff --git a/Common/File/FileDescriptor.cpp b/Common/File/FileDescriptor.cpp index 480bdf31b8..a68dc77f40 100644 --- a/Common/File/FileDescriptor.cpp +++ b/Common/File/FileDescriptor.cpp @@ -17,7 +17,7 @@ #endif #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/File/FileDescriptor.h" #include "Common/Log.h" diff --git a/Common/File/FileUtil.h b/Common/File/FileUtil.h index af11e5035c..9f9c549111 100644 --- a/Common/File/FileUtil.h +++ b/Common/File/FileUtil.h @@ -20,11 +20,9 @@ #include #include #include -#include #include #include -#include "Common/Common.h" #include "Common/File/Path.h" // Some functions here support Android content URIs. These are marked as such. diff --git a/Common/File/PathBrowser.cpp b/Common/File/PathBrowser.cpp index 32487d4163..c3f0c26675 100644 --- a/Common/File/PathBrowser.cpp +++ b/Common/File/PathBrowser.cpp @@ -15,6 +15,7 @@ #include "Common/Log.h" #include "Common/Thread/ThreadUtil.h" +#include "Core/Config.h" #include "Core/System.h" #if PPSSPP_PLATFORM(ANDROID) diff --git a/Common/GPU/OpenGL/GLSLProgram.h b/Common/GPU/OpenGL/GLSLProgram.h index ae6020c43a..fff73a957b 100644 --- a/Common/GPU/OpenGL/GLSLProgram.h +++ b/Common/GPU/OpenGL/GLSLProgram.h @@ -3,7 +3,6 @@ #pragma once -#include #include #include diff --git a/Common/GPU/ShaderWriter.cpp b/Common/GPU/ShaderWriter.cpp index 9b6e64afac..d53f00169e 100644 --- a/Common/GPU/ShaderWriter.cpp +++ b/Common/GPU/ShaderWriter.cpp @@ -4,6 +4,7 @@ #include "Common/GPU/Shader.h" #include "Common/GPU/ShaderWriter.h" +#include "Common/Log.h" const char *vulkan_glsl_preamble_fs = "#version 450\n" diff --git a/Common/GPU/ShaderWriter.h b/Common/GPU/ShaderWriter.h index 3aa1a4df29..cb8d963be3 100644 --- a/Common/GPU/ShaderWriter.h +++ b/Common/GPU/ShaderWriter.h @@ -2,7 +2,6 @@ #include -#include "Common/Log.h" #include "Common/GPU/Shader.h" #include "GPU/ge_constants.h" #include "GPU/GPUCommon.h" diff --git a/Common/GPU/Vulkan/VulkanMemory.h b/Common/GPU/Vulkan/VulkanMemory.h index 605a119bbf..c68e76c4dd 100644 --- a/Common/GPU/Vulkan/VulkanMemory.h +++ b/Common/GPU/Vulkan/VulkanMemory.h @@ -5,7 +5,6 @@ #include #include -#include "Common/Log.h" #include "Common/GPU/Vulkan/VulkanContext.h" // Forward declaration diff --git a/Common/GPU/Vulkan/VulkanProfiler.h b/Common/GPU/Vulkan/VulkanProfiler.h index 9d168fb2ec..d7b08d6738 100644 --- a/Common/GPU/Vulkan/VulkanProfiler.h +++ b/Common/GPU/Vulkan/VulkanProfiler.h @@ -3,7 +3,6 @@ #include #include -#include "Common/Log.h" #include "VulkanLoader.h" // Simple scoped based profiler, initially meant for instant one-time tasks like texture uploads diff --git a/Common/Input/GestureDetector.h b/Common/Input/GestureDetector.h index 5d4e54f36e..39c95dbaec 100644 --- a/Common/Input/GestureDetector.h +++ b/Common/Input/GestureDetector.h @@ -1,3 +1,4 @@ +#include #include "Common/Input/InputState.h" #include "Common/Math/geom2d.h" diff --git a/Common/Input/InputState.h b/Common/Input/InputState.h index 709684a298..a6117b6d3b 100644 --- a/Common/Input/InputState.h +++ b/Common/Input/InputState.h @@ -3,8 +3,6 @@ // For more detailed and configurable input, implement NativeTouch, NativeKey and NativeAxis and do your // own mapping. Might later move the mapping system from PPSSPP to native. -#include -#include #include #include diff --git a/Common/Log.cpp b/Common/Log.cpp index 1a1df0be45..308a93f457 100644 --- a/Common/Log.cpp +++ b/Common/Log.cpp @@ -19,7 +19,7 @@ #include "ppsspp_config.h" -#include "Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "StringUtils.h" #include "Common/Data/Encoding/Utf8.h" diff --git a/Common/Math/curves.cpp b/Common/Math/curves.cpp index 099327c6c1..88c915b62d 100644 --- a/Common/Math/curves.cpp +++ b/Common/Math/curves.cpp @@ -4,8 +4,6 @@ #include "Common/Math/math_util.h" #include "curves.h" -#include "Common/Common.h" - float linearInOut(int t, int fadeInLength, int solidLength, int fadeOutLength) { if (t < 0) return 0; if (t < fadeInLength) { diff --git a/Common/MemArena.h b/Common/MemArena.h index 3c5243ddff..85112e9129 100644 --- a/Common/MemArena.h +++ b/Common/MemArena.h @@ -25,7 +25,7 @@ #include #endif -#include "Common.h" +#include "Common/CommonTypes.h" // This class lets you create a block of anonymous RAM, and then arbitrarily map views into it. // Multiple views can mirror the same section of the block, which makes it very convient for emulating diff --git a/Common/MemArenaDarwin.cpp b/Common/MemArenaDarwin.cpp index 1950ccf2df..d13e37a8a7 100644 --- a/Common/MemArenaDarwin.cpp +++ b/Common/MemArenaDarwin.cpp @@ -19,7 +19,6 @@ #if defined(__APPLE__) -#include #include #include #include diff --git a/Common/MemoryUtil.cpp b/Common/MemoryUtil.cpp index 536858f6c6..1e4a479e05 100644 --- a/Common/MemoryUtil.cpp +++ b/Common/MemoryUtil.cpp @@ -20,7 +20,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Common/MemoryUtil.h" #include "Common/StringUtils.h" diff --git a/Common/MipsCPUDetect.cpp b/Common/MipsCPUDetect.cpp index e3b383dc7c..1fd93e29b1 100644 --- a/Common/MipsCPUDetect.cpp +++ b/Common/MipsCPUDetect.cpp @@ -18,7 +18,7 @@ #include "ppsspp_config.h" #if PPSSPP_ARCH(MIPS) || PPSSPP_ARCH(MIPS64) -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/CPUDetect.h" #include "Common/StringUtils.h" #include "Common/File/FileUtil.h" diff --git a/Common/MipsEmitter.h b/Common/MipsEmitter.h index 6f57324297..77ffd5f41e 100644 --- a/Common/MipsEmitter.h +++ b/Common/MipsEmitter.h @@ -18,11 +18,10 @@ #pragma once #include -#include #include #include "Common/CodeBlock.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" namespace MIPSGen { diff --git a/Common/Profiler/Profiler.cpp b/Common/Profiler/Profiler.cpp index 7d3521012e..7d59a9add7 100644 --- a/Common/Profiler/Profiler.cpp +++ b/Common/Profiler/Profiler.cpp @@ -2,8 +2,6 @@ #include #include -#include -#include #include #include diff --git a/Common/StringUtils.cpp b/Common/StringUtils.cpp index f54b2e975f..e3d67c5a78 100644 --- a/Common/StringUtils.cpp +++ b/Common/StringUtils.cpp @@ -41,7 +41,6 @@ #include #include -#include "Common/Common.h" #include "Common/Buffer.h" #include "Common/StringUtils.h" diff --git a/Common/StringUtils.h b/Common/StringUtils.h index 89127be810..696018e35d 100644 --- a/Common/StringUtils.h +++ b/Common/StringUtils.h @@ -17,8 +17,8 @@ #pragma once -#include "Common.h" - +#include +#include #include #include diff --git a/Common/Thread/Promise.h b/Common/Thread/Promise.h index cd057631ef..fe2ddb3807 100644 --- a/Common/Thread/Promise.h +++ b/Common/Thread/Promise.h @@ -4,7 +4,6 @@ #include "Common/Thread/Channel.h" #include "Common/Thread/ThreadManager.h" -#include "Common/Log.h" template class PromiseTask : public Task { diff --git a/Common/Thunk.h b/Common/Thunk.h index 4e5feffd87..4511764834 100644 --- a/Common/Thunk.h +++ b/Common/Thunk.h @@ -19,8 +19,8 @@ #include -#include "Common.h" -#include "x64Emitter.h" +#include "Common/CommonTypes.h" +#include "Common/x64Emitter.h" // This simple class creates a wrapper around a C/C++ function that saves all fp state // before entering it, and restores it upon exit. This is required to be able to selectively diff --git a/Common/UI/UI.cpp b/Common/UI/UI.cpp index 8a4ad5deaf..826c6f77a4 100644 --- a/Common/UI/UI.cpp +++ b/Common/UI/UI.cpp @@ -1,14 +1,10 @@ // See header for documentation. -#include -#include #include #include -#include "Common/Data/Color/RGBAUtil.h" #include "Common/UI/UI.h" #include "Common/UI/Context.h" -#include "Common/Render/TextureAtlas.h" #include "Common/Render/DrawBuffer.h" // TODO: UI should probably not own these. diff --git a/Common/x64Analyzer.h b/Common/x64Analyzer.h index f9a35e785c..1e5c970221 100644 --- a/Common/x64Analyzer.h +++ b/Common/x64Analyzer.h @@ -17,7 +17,7 @@ #pragma once -#include "Common.h" +#include "Common/CommonTypes.h" struct LSInstructionInfo { diff --git a/Common/x64Emitter.h b/Common/x64Emitter.h index c6fa43b944..50887f18bf 100644 --- a/Common/x64Emitter.h +++ b/Common/x64Emitter.h @@ -22,7 +22,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Common/CodeBlock.h" diff --git a/Core/CoreParameter.h b/Core/CoreParameter.h index 1b98277bf5..1e5ef67935 100644 --- a/Core/CoreParameter.h +++ b/Core/CoreParameter.h @@ -20,7 +20,6 @@ #include #include "Core/Compatibility.h" -#include "Core/Config.h" enum GPUCore { GPUCORE_GLES, diff --git a/Core/CoreTiming.cpp b/Core/CoreTiming.cpp index 079828db53..589bbe748c 100644 --- a/Core/CoreTiming.cpp +++ b/Core/CoreTiming.cpp @@ -16,6 +16,7 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include +#include #include #include #include diff --git a/Core/Debugger/WebSocket/GameSubscriber.cpp b/Core/Debugger/WebSocket/GameSubscriber.cpp index 2d8bb1a116..8cb9fcfc69 100644 --- a/Core/Debugger/WebSocket/GameSubscriber.cpp +++ b/Core/Debugger/WebSocket/GameSubscriber.cpp @@ -15,6 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. +#include "Core/Config.h" #include "Core/Debugger/WebSocket/GameSubscriber.h" #include "Core/Debugger/WebSocket/WebSocketUtils.h" #include "Core/ELF/ParamSFO.h" diff --git a/Core/Dialog/PSPDialog.h b/Core/Dialog/PSPDialog.h index 54c95e217b..54a9488e36 100644 --- a/Core/Dialog/PSPDialog.h +++ b/Core/Dialog/PSPDialog.h @@ -17,7 +17,6 @@ #pragma once -#include "Common/Common.h" #include "Common/CommonTypes.h" #include "Common/Render/TextureAtlas.h" #include "Common/Swap.h" diff --git a/Core/Dialog/PSPGamedataInstallDialog.cpp b/Core/Dialog/PSPGamedataInstallDialog.cpp index 894a441479..0e550a9d2e 100644 --- a/Core/Dialog/PSPGamedataInstallDialog.cpp +++ b/Core/Dialog/PSPGamedataInstallDialog.cpp @@ -16,7 +16,7 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" #include "Core/ELF/ParamSFO.h" diff --git a/Core/Dialog/PSPNetconfDialog.cpp b/Core/Dialog/PSPNetconfDialog.cpp index 0528be972b..1e0535f301 100644 --- a/Core/Dialog/PSPNetconfDialog.cpp +++ b/Core/Dialog/PSPNetconfDialog.cpp @@ -15,10 +15,9 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#if defined(_WIN32) +#include #include "Common/CommonWindows.h" -#endif -#include +#include "Common/TimeUtil.h" #include "Common/Data/Text/I18n.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" diff --git a/Core/ELF/ElfTypes.h b/Core/ELF/ElfTypes.h index c3b9df4eb5..a3faf32ba9 100644 --- a/Core/ELF/ElfTypes.h +++ b/Core/ELF/ElfTypes.h @@ -17,7 +17,7 @@ #pragma once -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Swap.h" /////////////////////// diff --git a/Core/ELF/PBPReader.h b/Core/ELF/PBPReader.h index 679cf6a516..ad84740e84 100644 --- a/Core/ELF/PBPReader.h +++ b/Core/ELF/PBPReader.h @@ -18,7 +18,8 @@ #pragma once -#include "Common/Common.h" +#include +#include "Common/CommonTypes.h" #include "Common/Swap.h" enum PBPSubFile { diff --git a/Core/FileLoaders/DiskCachingFileLoader.h b/Core/FileLoaders/DiskCachingFileLoader.h index 8dafab9c4f..bfbf780c2b 100644 --- a/Core/FileLoaders/DiskCachingFileLoader.h +++ b/Core/FileLoaders/DiskCachingFileLoader.h @@ -21,7 +21,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/File/Path.h" #include "Common/Swap.h" #include "Core/Loaders.h" diff --git a/Core/FileLoaders/HTTPFileLoader.cpp b/Core/FileLoaders/HTTPFileLoader.cpp index a2d4080844..24e5387447 100644 --- a/Core/FileLoaders/HTTPFileLoader.cpp +++ b/Core/FileLoaders/HTTPFileLoader.cpp @@ -17,7 +17,6 @@ #include -#include "Common/Common.h" #include "Common/Log.h" #include "Common/StringUtils.h" #include "Core/Config.h" diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index 74c1fc9104..d60dfb5865 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -20,7 +20,6 @@ #include #include -#include "Common/Common.h" #include "Common/CommonTypes.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" diff --git a/Core/HDRemaster.cpp b/Core/HDRemaster.cpp index d3d0ff16b9..ec11d15009 100644 --- a/Core/HDRemaster.cpp +++ b/Core/HDRemaster.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Common.h" +#include "Common/CommonFuncs.h" #include "Core/HDRemaster.h" bool g_RemasterMode; diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 91d172e991..40a24d00b6 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -20,7 +20,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Data/Convert/SmallDataConvert.h" #include "Common/Log.h" #include "Common/Swap.h" diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index 9db3237a74..9632d90e0b 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -18,7 +18,7 @@ #include #include -#include "Common/CommonTypes.h" +#include "Common/Common.h" #include "Common/File/Path.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" diff --git a/Core/HLE/proAdhoc.cpp b/Core/HLE/proAdhoc.cpp index b2419a7990..54bc7695e1 100644 --- a/Core/HLE/proAdhoc.cpp +++ b/Core/HLE/proAdhoc.cpp @@ -51,6 +51,7 @@ #define TCP_MAXSEG 2 #endif // defined(HAVE_LIBNX) || PPSSPP_PLATFORM(SWITCH) +#include #include #include @@ -60,6 +61,7 @@ #include "Common/Serialize/SerializeFuncs.h" #include "Common/TimeUtil.h" +#include "Core/Config.h" #include "Core/Core.h" #include "Core/Host.h" #include "Core/HLE/sceKernelInterrupt.h" diff --git a/Core/HLE/proAdhoc.h b/Core/HLE/proAdhoc.h index f1e8e0dd06..5b54492f0d 100644 --- a/Core/HLE/proAdhoc.h +++ b/Core/HLE/proAdhoc.h @@ -38,14 +38,14 @@ #define PACK __attribute__((packed)) #endif -#include -#include #include +#include +#include +#include #include "Common/Net/Resolve.h" #include "Common/Serialize/Serializer.h" -#include "Core/Config.h" #include "Core/CoreTiming.h" #include "Core/MemMap.h" #include "Core/HLE/HLE.h" diff --git a/Core/HLE/sceIo.h b/Core/HLE/sceIo.h index b18612fd14..3169efe904 100644 --- a/Core/HLE/sceIo.h +++ b/Core/HLE/sceIo.h @@ -17,8 +17,6 @@ #pragma once -#include - class PointerWrap; class KernelObject; @@ -27,6 +25,7 @@ void __IoDoState(PointerWrap &p); void __IoShutdown(); struct ScePspDateTime; +struct tm; u32 sceIoIoctl(u32 id, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen); diff --git a/Core/HLE/sceJpeg.cpp b/Core/HLE/sceJpeg.cpp index d438a16111..9ad09796c9 100644 --- a/Core/HLE/sceJpeg.cpp +++ b/Core/HLE/sceJpeg.cpp @@ -18,7 +18,7 @@ #include #include "ext/jpge/jpgd.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" #include "Core/HLE/HLE.h" diff --git a/Core/HLE/sceKernel.h b/Core/HLE/sceKernel.h index 08cfb4903d..ec684b99f6 100644 --- a/Core/HLE/sceKernel.h +++ b/Core/HLE/sceKernel.h @@ -20,7 +20,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Common/Swap.h" diff --git a/Core/HLE/sceMpeg.h b/Core/HLE/sceMpeg.h index bf5b0dfcce..aded1238cc 100644 --- a/Core/HLE/sceMpeg.h +++ b/Core/HLE/sceMpeg.h @@ -17,7 +17,7 @@ #pragma once -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Swap.h" class PointerWrap; diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index 73038d5d2c..217245e46a 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -35,6 +35,7 @@ // This is a direct port of Coldbird's code from http://code.google.com/p/aemu/ // All credit goes to him! +#include "Core/Config.h" #include "Core/Core.h" #include "Core/Host.h" #include "Core/Reporting.h" diff --git a/Core/HLE/sceRtc.h b/Core/HLE/sceRtc.h index 0301da3b19..981343e1eb 100644 --- a/Core/HLE/sceRtc.h +++ b/Core/HLE/sceRtc.h @@ -17,7 +17,8 @@ #pragma once -#include "Common/Common.h" +#include "Common/CommonTypes.h" +#include "Common/Swap.h" class PointerWrap; diff --git a/Core/HLE/sceUtility.h b/Core/HLE/sceUtility.h index 510b22ea72..d7358a9ae5 100644 --- a/Core/HLE/sceUtility.h +++ b/Core/HLE/sceUtility.h @@ -17,9 +17,6 @@ #pragma once -#include -#include - class PointerWrap; // Valid values for PSP_SYSTEMPARAM_ID_INT_LANGUAGE diff --git a/Core/HW/Camera.h b/Core/HW/Camera.h index c23290915f..27664ce52d 100644 --- a/Core/HW/Camera.h +++ b/Core/HW/Camera.h @@ -19,7 +19,6 @@ #include "ppsspp_config.h" #include "Core/HLE/sceUsbCam.h" -#include "Log.h" #include "ext/jpge/jpgd.h" #include "ext/jpge/jpge.h" diff --git a/Core/HW/Display.cpp b/Core/HW/Display.cpp index cf28654074..ebabb647d0 100644 --- a/Core/HW/Display.cpp +++ b/Core/HW/Display.cpp @@ -19,7 +19,7 @@ #include #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Serialize/SerializeFuncs.h" #include "Common/System/System.h" #include "Common/TimeUtil.h" diff --git a/Core/HW/MemoryStick.cpp b/Core/HW/MemoryStick.cpp index 964a002900..4f20352bd3 100644 --- a/Core/HW/MemoryStick.cpp +++ b/Core/HW/MemoryStick.cpp @@ -21,6 +21,7 @@ #include #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" +#include "Core/Config.h" #include "Core/CoreTiming.h" #include "Core/Compatibility.h" #include "Core/FileSystems/MetaFileSystem.h" diff --git a/Core/HW/StereoResampler.cpp b/Core/HW/StereoResampler.cpp index 1a8a033821..9534a8e52f 100644 --- a/Core/HW/StereoResampler.cpp +++ b/Core/HW/StereoResampler.cpp @@ -36,6 +36,7 @@ #include #include +#include "Common/Common.h" #include "Common/System/System.h" #include "Common/Math/math_util.h" #include "Common/Serialize/Serializer.h" diff --git a/Core/MIPS/IR/IRJit.cpp b/Core/MIPS/IR/IRJit.cpp index f938619a9f..9ecbf100bd 100644 --- a/Core/MIPS/IR/IRJit.cpp +++ b/Core/MIPS/IR/IRJit.cpp @@ -24,6 +24,7 @@ #include "Common/Serialize/Serializer.h" #include "Common/StringUtils.h" +#include "Core/Config.h" #include "Core/Core.h" #include "Core/CoreTiming.h" #include "Core/HLE/sceKernelMemory.h" diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index a8e30db888..e5aadba24b 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -20,7 +20,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/CPUDetect.h" #include "Core/MIPS/JitCommon/JitBlockCache.h" #include "Core/MIPS/JitCommon/JitCommon.h" diff --git a/Core/MIPS/JitCommon/JitBlockCache.cpp b/Core/MIPS/JitCommon/JitBlockCache.cpp index 87e75c397c..b85b336fcd 100644 --- a/Core/MIPS/JitCommon/JitBlockCache.cpp +++ b/Core/MIPS/JitCommon/JitBlockCache.cpp @@ -20,7 +20,7 @@ #include #include "ext/xxhash.h" -#include "Common.h" +#include "Common/CommonTypes.h" #include "Common/Profiler/Profiler.h" #ifdef _WIN32 diff --git a/Core/MIPS/JitCommon/JitCommon.h b/Core/MIPS/JitCommon/JitCommon.h index 4fcfff3907..87eee83a9f 100644 --- a/Core/MIPS/JitCommon/JitCommon.h +++ b/Core/MIPS/JitCommon/JitCommon.h @@ -21,7 +21,6 @@ #include #include -#include "Common/Common.h" #include "Common/CommonTypes.h" #include "Core/MIPS/MIPS.h" diff --git a/Core/MIPS/JitCommon/JitState.h b/Core/MIPS/JitCommon/JitState.h index d3c998f817..cd2e038de3 100644 --- a/Core/MIPS/JitCommon/JitState.h +++ b/Core/MIPS/JitCommon/JitState.h @@ -18,7 +18,7 @@ #pragma once -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Core/MIPS/MIPS.h" diff --git a/Core/MIPS/MIPS.cpp b/Core/MIPS/MIPS.cpp index 41cf598a94..08958c14c6 100644 --- a/Core/MIPS/MIPS.cpp +++ b/Core/MIPS/MIPS.cpp @@ -21,7 +21,7 @@ #include "Common/Math/math_util.h" -#include "Common.h" +#include "Common/CommonTypes.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" #include "Core/ConfigValues.h" diff --git a/Core/MIPS/MIPS.h b/Core/MIPS/MIPS.h index 6635a153ff..1bab17031f 100644 --- a/Core/MIPS/MIPS.h +++ b/Core/MIPS/MIPS.h @@ -22,9 +22,7 @@ #include #include "Common/Data/Random/Rng.h" -#include "Common/Common.h" #include "Common/CommonTypes.h" -// #include "Core/CoreParameter.h" #include "Core/Opcode.h" class PointerWrap; diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index 00f5b46f67..305041ecb6 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -22,7 +22,7 @@ #include "Common/BitSet.h" #include "Common/BitScan.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/Config.h" #include "Core/Core.h" #include "Core/Host.h" diff --git a/Core/MIPS/x86/CompALU.cpp b/Core/MIPS/x86/CompALU.cpp index fdb58765f6..09c72fcab1 100644 --- a/Core/MIPS/x86/CompALU.cpp +++ b/Core/MIPS/x86/CompALU.cpp @@ -21,7 +21,7 @@ #include #include "Common/BitSet.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/MIPS/MIPSCodeUtils.h" #include "Core/MIPS/x86/Jit.h" #include "Core/MIPS/x86/RegCache.h" diff --git a/Core/MIPS/x86/CompFPU.cpp b/Core/MIPS/x86/CompFPU.cpp index 135af332a1..52b7742c5b 100644 --- a/Core/MIPS/x86/CompFPU.cpp +++ b/Core/MIPS/x86/CompFPU.cpp @@ -20,7 +20,7 @@ #include "Core/Config.h" #include "Core/MemMap.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/MIPS/MIPS.h" #include "Core/MIPS/MIPSCodeUtils.h" #include "Core/MIPS/x86/Jit.h" diff --git a/Core/MemFault.cpp b/Core/MemFault.cpp index a55dda88f1..bf4021749b 100644 --- a/Core/MemFault.cpp +++ b/Core/MemFault.cpp @@ -33,6 +33,7 @@ #endif #include "Common/Log.h" +#include "Core/Config.h" #include "Core/Core.h" #include "Core/MemFault.h" #include "Core/MemMap.h" diff --git a/Core/MemMap.h b/Core/MemMap.h index 49e67f3aa0..d21d97a43d 100644 --- a/Core/MemMap.h +++ b/Core/MemMap.h @@ -25,8 +25,6 @@ #include #endif -// Includes -#include "Common/Common.h" #include "Common/CommonTypes.h" #include "Common/Swap.h" #include "Core/Opcode.h" diff --git a/Core/MemMapFunctions.cpp b/Core/MemMapFunctions.cpp index 85ccb7e55c..b6bbf86b20 100644 --- a/Core/MemMapFunctions.cpp +++ b/Core/MemMapFunctions.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/Core.h" #include "Core/MemMap.h" diff --git a/Core/Replay.cpp b/Core/Replay.cpp index e94eebe04b..4a8c26a642 100644 --- a/Core/Replay.cpp +++ b/Core/Replay.cpp @@ -26,7 +26,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Common/File/FileUtil.h" #include "Common/StringUtils.h" diff --git a/Core/Replay.h b/Core/Replay.h index 8ed514108c..0858c304d5 100644 --- a/Core/Replay.h +++ b/Core/Replay.h @@ -18,7 +18,6 @@ #pragma once #include -#include #include #include "Common/File/Path.h" diff --git a/Core/TextureReplacer.h b/Core/TextureReplacer.h index 6deefe8daf..211ca16ac2 100644 --- a/Core/TextureReplacer.h +++ b/Core/TextureReplacer.h @@ -17,12 +17,11 @@ #pragma once -#include #include #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/MemoryUtil.h" #include "Common/File/Path.h" diff --git a/Core/Util/AudioFormatNEON.cpp b/Core/Util/AudioFormatNEON.cpp index 8a3bc61579..e2e72c209f 100644 --- a/Core/Util/AudioFormatNEON.cpp +++ b/Core/Util/AudioFormatNEON.cpp @@ -23,7 +23,7 @@ #else #include #endif -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/Util/AudioFormat.h" #include "Core/Util/AudioFormatNEON.h" diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index f469e5507b..ccd5a79bd5 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -28,6 +28,7 @@ #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" #include "Common/StringUtils.h" +#include "Core/Config.h" #include "Core/HDRemaster.h" #include "Core/Host.h" #include "GPU/ge_constants.h" diff --git a/Core/Util/PPGeDraw.h b/Core/Util/PPGeDraw.h index 369d7a4bf4..409b56564b 100644 --- a/Core/Util/PPGeDraw.h +++ b/Core/Util/PPGeDraw.h @@ -22,7 +22,7 @@ #include "Common/Render/TextureAtlas.h" -#include "Common/CommonTypes.h" +#include "Common/Common.h" class PointerWrap; diff --git a/Core/Util/PortManager.cpp b/Core/Util/PortManager.cpp index 20ffaeb79e..79120053c8 100644 --- a/Core/Util/PortManager.cpp +++ b/Core/Util/PortManager.cpp @@ -35,6 +35,7 @@ #include "Common/Net/Resolve.h" #include "Common/Thread/ThreadUtil.h" #include "Common/Log.h" +#include "Core/Config.h" #include "Core/System.h" #include "Core/Host.h" #include "Core/ELF/ParamSFO.h" diff --git a/Core/WaveFile.cpp b/Core/WaveFile.cpp index 83d45077b3..551d33bd36 100644 --- a/Core/WaveFile.cpp +++ b/Core/WaveFile.cpp @@ -2,8 +2,6 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include - #include "Core/WaveFile.h" #include "Common/Log.h" #include "Core/Config.h" diff --git a/Core/WaveFile.h b/Core/WaveFile.h index 725e64fff2..50be39dcb0 100644 --- a/Core/WaveFile.h +++ b/Core/WaveFile.h @@ -13,7 +13,6 @@ #pragma once #include -#include #include #include "Common/File/FileUtil.h" diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 152c202f06..1b609e34ff 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -23,7 +23,7 @@ #include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Data/Text/I18n.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/Core.h" diff --git a/GPU/Common/ReinterpretFramebuffer.cpp b/GPU/Common/ReinterpretFramebuffer.cpp index 15bd29939b..da2f0ef7b1 100644 --- a/GPU/Common/ReinterpretFramebuffer.cpp +++ b/GPU/Common/ReinterpretFramebuffer.cpp @@ -2,6 +2,7 @@ #include "Common/GPU/Shader.h" #include "Common/GPU/ShaderWriter.h" +#include "Common/Log.h" #include "GPU/Common/ReinterpretFramebuffer.h" static const VaryingDef varyings[1] = { diff --git a/GPU/Common/ReinterpretFramebuffer.h b/GPU/Common/ReinterpretFramebuffer.h index 14b8b042a9..e45472a321 100644 --- a/GPU/Common/ReinterpretFramebuffer.h +++ b/GPU/Common/ReinterpretFramebuffer.h @@ -1,6 +1,5 @@ #pragma once -#include "Common/Log.h" #include "GPU/ge_constants.h" #include "GPU/GPUCommon.h" #include "Common/GPU/ShaderWriter.h" diff --git a/GPU/Common/ShaderCommon.h b/GPU/Common/ShaderCommon.h index d45f43bc06..e83e5ea388 100644 --- a/GPU/Common/ShaderCommon.h +++ b/GPU/Common/ShaderCommon.h @@ -18,7 +18,6 @@ #pragma once #include -#include namespace Draw { class DrawContext; diff --git a/GPU/Common/ShaderId.h b/GPU/Common/ShaderId.h index d2e49d0e9e..3c1d75226f 100644 --- a/GPU/Common/ShaderId.h +++ b/GPU/Common/ShaderId.h @@ -4,7 +4,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonFuncs.h" // TODO: There will be additional bits, indicating that groups of these will be // sent to the shader and processed there. This will cut down the number of shaders ("ubershader approach") diff --git a/GPU/Common/SplineCommon.cpp b/GPU/Common/SplineCommon.cpp index ed92f41b77..d3f864a4d4 100644 --- a/GPU/Common/SplineCommon.cpp +++ b/GPU/Common/SplineCommon.cpp @@ -18,10 +18,9 @@ #include #include -#include "Common/Profiler/Profiler.h" - +#include "Common/Common.h" #include "Common/CPUDetect.h" - +#include "Common/Profiler/Profiler.h" #include "GPU/Common/GPUStateUtils.h" #include "GPU/Common/SplineCommon.h" #include "GPU/Common/DrawEngineCommon.h" diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 4adcb76c0d..076899015d 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -18,6 +18,7 @@ #include #include "ppsspp_config.h" +#include "Common/Common.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Profiler/Profiler.h" #include "Common/MemoryUtil.h" diff --git a/GPU/Common/TextureDecoder.cpp b/GPU/Common/TextureDecoder.cpp index bf02d2ae2d..7cd89f58f4 100644 --- a/GPU/Common/TextureDecoder.cpp +++ b/GPU/Common/TextureDecoder.cpp @@ -17,6 +17,7 @@ #include "ppsspp_config.h" #include "ext/xxhash.h" +#include "Common/Common.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/CPUDetect.h" #include "Common/Log.h" diff --git a/GPU/Common/TextureScalerCommon.h b/GPU/Common/TextureScalerCommon.h index 6b2a6eb488..96c0e86390 100644 --- a/GPU/Common/TextureScalerCommon.h +++ b/GPU/Common/TextureScalerCommon.h @@ -20,8 +20,6 @@ #include "Common/CommonTypes.h" #include "Common/MemoryUtil.h" -#include - static const int MIN_TEXSCALE_LINES_PER_THREAD = 4; class TextureScalerCommon { diff --git a/GPU/Common/VertexDecoderCommon.cpp b/GPU/Common/VertexDecoderCommon.cpp index ecf247e530..fd4365d34e 100644 --- a/GPU/Common/VertexDecoderCommon.cpp +++ b/GPU/Common/VertexDecoderCommon.cpp @@ -20,7 +20,7 @@ #include "ppsspp_config.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/CPUDetect.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Log.h" diff --git a/GPU/Common/VertexDecoderCommon.h b/GPU/Common/VertexDecoderCommon.h index 2911e8e6fe..33725facb3 100644 --- a/GPU/Common/VertexDecoderCommon.h +++ b/GPU/Common/VertexDecoderCommon.h @@ -21,7 +21,7 @@ #include "ppsspp_config.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Data/Collections/Hashmaps.h" #include "Common/Log.h" #include "Core/Reporting.h" diff --git a/GPU/D3D11/DepalettizeShaderD3D11.cpp b/GPU/D3D11/DepalettizeShaderD3D11.cpp index e2a1c58e91..05e8621d47 100644 --- a/GPU/D3D11/DepalettizeShaderD3D11.cpp +++ b/GPU/D3D11/DepalettizeShaderD3D11.cpp @@ -18,7 +18,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Log.h" #include "Common/StringUtils.h" diff --git a/GPU/D3D11/DrawEngineD3D11.h b/GPU/D3D11/DrawEngineD3D11.h index cbca41427a..acfbc01be3 100644 --- a/GPU/D3D11/DrawEngineD3D11.h +++ b/GPU/D3D11/DrawEngineD3D11.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include diff --git a/GPU/D3D11/ShaderManagerD3D11.cpp b/GPU/D3D11/ShaderManagerD3D11.cpp index 1c615e2b71..c141c1ed5b 100644 --- a/GPU/D3D11/ShaderManagerD3D11.cpp +++ b/GPU/D3D11/ShaderManagerD3D11.cpp @@ -28,7 +28,7 @@ #include "Common/GPU/thin3d.h" #include "Common/Data/Encoding/Utf8.h" #include "Common/Log.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/Config.h" #include "Core/Reporting.h" #include "GPU/Math3D.h" diff --git a/GPU/D3D11/ShaderManagerD3D11.h b/GPU/D3D11/ShaderManagerD3D11.h index ca517d2fa6..df8f7e4809 100644 --- a/GPU/D3D11/ShaderManagerD3D11.h +++ b/GPU/D3D11/ShaderManagerD3D11.h @@ -21,7 +21,7 @@ #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/ShaderId.h" #include "GPU/Common/ShaderUniforms.h" diff --git a/GPU/Debugger/Breakpoints.cpp b/GPU/Debugger/Breakpoints.cpp index 90bd76c524..e3e75a70b8 100644 --- a/GPU/Debugger/Breakpoints.cpp +++ b/GPU/Debugger/Breakpoints.cpp @@ -19,6 +19,7 @@ #include #include +#include "Common/CommonFuncs.h" #include "GPU/Debugger/Breakpoints.h" #include "GPU/GPUState.h" diff --git a/GPU/Debugger/Playback.cpp b/GPU/Debugger/Playback.cpp index 459fe52f23..6c27351800 100644 --- a/GPU/Debugger/Playback.cpp +++ b/GPU/Debugger/Playback.cpp @@ -23,8 +23,9 @@ #include #include #include "Common/Profiler/Profiler.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" +#include "Core/Config.h" #include "Core/Core.h" #include "Core/CoreTiming.h" #include "Core/ELF/ParamSFO.h" diff --git a/GPU/Debugger/Record.cpp b/GPU/Debugger/Record.cpp index e6e91dc769..df93462aa1 100644 --- a/GPU/Debugger/Record.cpp +++ b/GPU/Debugger/Record.cpp @@ -24,7 +24,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/File/FileUtil.h" #include "Common/Thread/ParallelLoop.h" #include "Common/Log.h" diff --git a/GPU/Debugger/Record.h b/GPU/Debugger/Record.h index e5e7e31cd1..d4872d630c 100644 --- a/GPU/Debugger/Record.h +++ b/GPU/Debugger/Record.h @@ -18,10 +18,10 @@ #pragma once #include -#include #include "Common/CommonTypes.h" -#include "Common/File/Path.h" + +class Path; namespace GPURecord { diff --git a/GPU/Directx9/FramebufferManagerDX9.cpp b/GPU/Directx9/FramebufferManagerDX9.cpp index a63e6f9e70..15cb846a1b 100644 --- a/GPU/Directx9/FramebufferManagerDX9.cpp +++ b/GPU/Directx9/FramebufferManagerDX9.cpp @@ -15,10 +15,10 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Common/Math/lin/matrix4x4.h" -#include "Common/GPU/thin3d.h" - +#include "Common/Common.h" #include "Common/Data/Convert/ColorConv.h" +#include "Common/GPU/thin3d.h" +#include "Common/Math/lin/matrix4x4.h" #include "Core/MemMap.h" #include "Core/Config.h" #include "Core/ConfigValues.h" diff --git a/GPU/Directx9/ShaderManagerDX9.cpp b/GPU/Directx9/ShaderManagerDX9.cpp index 2f7abf2fdd..0d3e55555f 100644 --- a/GPU/Directx9/ShaderManagerDX9.cpp +++ b/GPU/Directx9/ShaderManagerDX9.cpp @@ -31,7 +31,7 @@ #include "Common/GPU/thin3d.h" #include "Common/System/Display.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Common/StringUtils.h" diff --git a/GPU/Directx9/ShaderManagerDX9.h b/GPU/Directx9/ShaderManagerDX9.h index 7c4a39be52..3c1e42d1fd 100644 --- a/GPU/Directx9/ShaderManagerDX9.h +++ b/GPU/Directx9/ShaderManagerDX9.h @@ -20,7 +20,7 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "GPU/Common/VertexShaderGenerator.h" #include "GPU/Common/FragmentShaderGenerator.h" #include "GPU/Common/ShaderCommon.h" diff --git a/GPU/Directx9/TextureCacheDX9.h b/GPU/Directx9/TextureCacheDX9.h index d99dfd7ebc..bb1b58f79c 100644 --- a/GPU/Directx9/TextureCacheDX9.h +++ b/GPU/Directx9/TextureCacheDX9.h @@ -17,8 +17,6 @@ #pragma once -#include - #include #include "GPU/GPU.h" diff --git a/GPU/Directx9/TextureScalerDX9.cpp b/GPU/Directx9/TextureScalerDX9.cpp index f1f72ff253..755c06cf2d 100644 --- a/GPU/Directx9/TextureScalerDX9.cpp +++ b/GPU/Directx9/TextureScalerDX9.cpp @@ -17,7 +17,7 @@ #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Thread/ParallelLoop.h" #include "Core/ThreadPools.h" diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index b95f6881fa..160b435b27 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -19,6 +19,7 @@ #include #include "ext/xxhash.h" +#include "Common/Common.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Data/Text/I18n.h" #include "Common/Math/math_util.h" diff --git a/GPU/GLES/TextureCacheGLES.h b/GPU/GLES/TextureCacheGLES.h index 674db91b8a..dc01af9c66 100644 --- a/GPU/GLES/TextureCacheGLES.h +++ b/GPU/GLES/TextureCacheGLES.h @@ -17,8 +17,6 @@ #pragma once -#include - #include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/GPU/OpenGL/GLCommon.h" #include "Common/GPU/OpenGL/GLRenderManager.h" diff --git a/GPU/GPUState.cpp b/GPU/GPUState.cpp index 1aa5050d6b..cec0f0c5d1 100644 --- a/GPU/GPUState.cpp +++ b/GPU/GPUState.cpp @@ -16,15 +16,15 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "ppsspp_config.h" -#include "GPU/ge_constants.h" -#include "GPU/GPUState.h" - +#include "Common/Common.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" #include "Core/CoreParameter.h" #include "Core/Config.h" #include "Core/System.h" #include "Core/MemMap.h" +#include "GPU/ge_constants.h" +#include "GPU/GPUState.h" #ifdef _M_SSE #include diff --git a/GPU/GPUState.h b/GPU/GPUState.h index 2ffa88ed3d..6b8f20fa8a 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -17,7 +17,7 @@ #pragma once -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Swap.h" #include "GPU/GPU.h" #include "GPU/ge_constants.h" diff --git a/GPU/Math3D.cpp b/GPU/Math3D.cpp index b968d5be15..83d31f1d33 100644 --- a/GPU/Math3D.cpp +++ b/GPU/Math3D.cpp @@ -15,7 +15,8 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Math3D.h" +#include "Common/Common.h" +#include "GPU/Math3D.h" namespace Math3D { diff --git a/GPU/Software/BinManager.h b/GPU/Software/BinManager.h index 0258a0e77c..b206b8deae 100644 --- a/GPU/Software/BinManager.h +++ b/GPU/Software/BinManager.h @@ -19,7 +19,6 @@ #include #include -#include "Common/Log.h" #include "GPU/Software/Rasterizer.h" struct BinWaitable; diff --git a/GPU/Software/DrawPixel.cpp b/GPU/Software/DrawPixel.cpp index 6349c40994..3585c9a3ff 100644 --- a/GPU/Software/DrawPixel.cpp +++ b/GPU/Software/DrawPixel.cpp @@ -16,6 +16,7 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include +#include "Common/Common.h" #include "Common/Data/Convert/ColorConv.h" #include "Core/Config.h" #include "GPU/GPUState.h" diff --git a/GPU/Software/Lighting.cpp b/GPU/Software/Lighting.cpp index 9c9779a9f2..262811318f 100644 --- a/GPU/Software/Lighting.cpp +++ b/GPU/Software/Lighting.cpp @@ -17,6 +17,7 @@ #include "ppsspp_config.h" #include +#include "Common/Common.h" #include "Common/CPUDetect.h" #include "GPU/GPUState.h" #include "GPU/Software/Lighting.h" diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index 5d50122e7e..c6c3d53683 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -19,6 +19,7 @@ #include #include +#include "Common/Common.h" #include "Common/CPUDetect.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Profiler/Profiler.h" diff --git a/GPU/Software/Rasterizer.h b/GPU/Software/Rasterizer.h index 65cf3cf2bb..0e6d289163 100644 --- a/GPU/Software/Rasterizer.h +++ b/GPU/Software/Rasterizer.h @@ -19,7 +19,6 @@ #include "GPU/Software/DrawPixel.h" #include "GPU/Software/FuncId.h" -#include "GPU/Software/RasterizerRegCache.h" #include "GPU/Software/Sampler.h" #include "GPU/Software/TransformUnit.h" // for DrawingCoords diff --git a/GPU/Software/RasterizerRectangle.cpp b/GPU/Software/RasterizerRectangle.cpp index 844520b7f8..165ee3f40c 100644 --- a/GPU/Software/RasterizerRectangle.cpp +++ b/GPU/Software/RasterizerRectangle.cpp @@ -3,6 +3,7 @@ #include #include +#include "Common/Common.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/Profiler/Profiler.h" #include "Common/StringUtils.h" diff --git a/GPU/Software/RasterizerRegCache.h b/GPU/Software/RasterizerRegCache.h index 9c8f0e3471..03ad0c136b 100644 --- a/GPU/Software/RasterizerRegCache.h +++ b/GPU/Software/RasterizerRegCache.h @@ -24,6 +24,7 @@ #include #include +#include "Common/Common.h" #if defined(_M_SSE) #include #endif diff --git a/GPU/Software/Sampler.cpp b/GPU/Software/Sampler.cpp index 88b77e642e..fb61db3d1f 100644 --- a/GPU/Software/Sampler.cpp +++ b/GPU/Software/Sampler.cpp @@ -18,6 +18,7 @@ #include "ppsspp_config.h" #include #include +#include "Common/Common.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/StringUtils.h" #include "Core/Config.h" diff --git a/GPU/Software/TransformUnit.cpp b/GPU/Software/TransformUnit.cpp index d0ac3a28a1..3c5e554b87 100644 --- a/GPU/Software/TransformUnit.cpp +++ b/GPU/Software/TransformUnit.cpp @@ -18,6 +18,7 @@ #include #include +#include "Common/Common.h" #include "Common/CPUDetect.h" #include "Common/Math/math_util.h" #include "Common/MemoryUtil.h" diff --git a/GPU/Vulkan/ShaderManagerVulkan.cpp b/GPU/Vulkan/ShaderManagerVulkan.cpp index 6af806a399..9e2c36a949 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.cpp +++ b/GPU/Vulkan/ShaderManagerVulkan.cpp @@ -30,7 +30,7 @@ #include "Common/GPU/Vulkan/VulkanContext.h" #include "Common/GPU/Vulkan/VulkanMemory.h" #include "Common/Log.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/Config.h" #include "Core/Reporting.h" #include "GPU/Math3D.h" diff --git a/GPU/Vulkan/StencilBufferVulkan.cpp b/GPU/Vulkan/StencilBufferVulkan.cpp index f97434b4d4..0bb76ee439 100644 --- a/GPU/Vulkan/StencilBufferVulkan.cpp +++ b/GPU/Vulkan/StencilBufferVulkan.cpp @@ -19,6 +19,7 @@ #include "Common/GPU/Vulkan/VulkanRenderManager.h" #include "Common/Log.h" +#include "Core/Config.h" #include "Core/Reporting.h" #include "GPU/Common/StencilCommon.h" #include "GPU/Vulkan/FramebufferManagerVulkan.h" diff --git a/GPU/Vulkan/TextureCacheVulkan.h b/GPU/Vulkan/TextureCacheVulkan.h index bf3870e005..5c9b7a91ff 100644 --- a/GPU/Vulkan/TextureCacheVulkan.h +++ b/GPU/Vulkan/TextureCacheVulkan.h @@ -17,8 +17,6 @@ #pragma once -#include - #include "Common/Data/Collections/Hashmaps.h" #include "GPU/GPUInterface.h" #include "GPU/GPUState.h" diff --git a/GPU/Vulkan/TextureScalerVulkan.cpp b/GPU/Vulkan/TextureScalerVulkan.cpp index cdcb00181b..3b060f0d8f 100644 --- a/GPU/Vulkan/TextureScalerVulkan.cpp +++ b/GPU/Vulkan/TextureScalerVulkan.cpp @@ -17,7 +17,7 @@ #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Data/Convert/ColorConv.h" #include "Common/GPU/Vulkan/VulkanContext.h" #include "Common/Log.h" diff --git a/Qt/QtHost.cpp b/Qt/QtHost.cpp index 02ed199734..9528d4a5ac 100644 --- a/Qt/QtHost.cpp +++ b/Qt/QtHost.cpp @@ -15,7 +15,6 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include #include "Qt/QtHost.h" Path QtHost::SymbolMapFilename(Path currentFilename) { diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h index 99c9fc3ad2..87718b51cf 100644 --- a/Qt/mainwindow.h +++ b/Qt/mainwindow.h @@ -2,6 +2,7 @@ #include #include +#include #include #include diff --git a/SDL/SDLJoystick.h b/SDL/SDLJoystick.h index 057e332b25..4ab237ae12 100644 --- a/SDL/SDLJoystick.h +++ b/SDL/SDLJoystick.h @@ -6,6 +6,7 @@ #include "SDL.h" #include "SDL_thread.h" #endif +#include #include "Common/Input/InputState.h" #include "Common/Input/KeyCodes.h" diff --git a/UI/ComboKeyMappingScreen.h b/UI/ComboKeyMappingScreen.h index 4ee477444d..cf82e703e8 100644 --- a/UI/ComboKeyMappingScreen.h +++ b/UI/ComboKeyMappingScreen.h @@ -20,8 +20,6 @@ #include "MiscScreens.h" #include "UI/GamepadEmu.h" -#include - namespace UI { class CheckBox; } diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 4908c0d47a..71961b8d21 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -27,6 +27,7 @@ #include "ppsspp_config.h" +#include "Common/Common.h" #include "Common/System/Display.h" #include "Common/System/NativeApp.h" #include "Common/System/System.h" diff --git a/UI/DevScreens.h b/UI/DevScreens.h index 5630eb1475..4e7065307e 100644 --- a/UI/DevScreens.h +++ b/UI/DevScreens.h @@ -17,8 +17,6 @@ #pragma once -#include -#include #include #include #include diff --git a/UI/DiscordIntegration.cpp b/UI/DiscordIntegration.cpp index f5838fc72c..359765ddf9 100644 --- a/UI/DiscordIntegration.cpp +++ b/UI/DiscordIntegration.cpp @@ -1,5 +1,6 @@ #include +#include #include "ppsspp_config.h" #include "Common/Log.h" diff --git a/UI/DiscordIntegration.h b/UI/DiscordIntegration.h index a2911d6877..4bbca308da 100644 --- a/UI/DiscordIntegration.h +++ b/UI/DiscordIntegration.h @@ -1,7 +1,5 @@ #pragma once -#include - // Simple wrapper around the Discord api. // All platforms should call it, but we only actually take action on diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 2211cb6cbb..3e0dd6479a 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -16,7 +16,6 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include -#include #include "Common/System/Display.h" #include "Common/System/System.h" diff --git a/UI/DisplayLayoutScreen.h b/UI/DisplayLayoutScreen.h index 9db82c612c..15835258eb 100644 --- a/UI/DisplayLayoutScreen.h +++ b/UI/DisplayLayoutScreen.h @@ -20,7 +20,6 @@ #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" #include "MiscScreens.h" -#include class DragDropDisplay; diff --git a/UI/GPUDriverTestScreen.cpp b/UI/GPUDriverTestScreen.cpp index 7f0773971a..93ed51976d 100644 --- a/UI/GPUDriverTestScreen.cpp +++ b/UI/GPUDriverTestScreen.cpp @@ -1,5 +1,6 @@ #include "GPUDriverTestScreen.h" #include "Common/Data/Text/I18n.h" +#include "Common/UI/UI.h" #include "Common/UI/View.h" #include "Common/GPU/Shader.h" #include "Common/GPU/ShaderWriter.h" diff --git a/UI/GPUDriverTestScreen.h b/UI/GPUDriverTestScreen.h index 2eb077c826..f2c5796be1 100644 --- a/UI/GPUDriverTestScreen.h +++ b/UI/GPUDriverTestScreen.h @@ -4,7 +4,6 @@ #include "Common/UI/Context.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" -#include "Common/UI/UI.h" #include "Common/LogManager.h" #include "UI/MiscScreens.h" diff --git a/UI/RemoteISOScreen.cpp b/UI/RemoteISOScreen.cpp index 95d0ef0da1..4497f169db 100644 --- a/UI/RemoteISOScreen.cpp +++ b/UI/RemoteISOScreen.cpp @@ -35,9 +35,10 @@ #include "Common/Data/Format/JSONReader.h" #include "Common/Data/Text/I18n.h" #include "Common/Common.h" -#include "Common/TimeUtil.h" +#include "Common/Log.h" #include "Common/StringUtils.h" #include "Common/System/System.h" +#include "Common/TimeUtil.h" #include "Core/Config.h" #include "Core/WebServer.h" #include "UI/RemoteISOScreen.h" diff --git a/UI/ReportScreen.cpp b/UI/ReportScreen.cpp index 7d92bfd8db..101ec4c83b 100644 --- a/UI/ReportScreen.cpp +++ b/UI/ReportScreen.cpp @@ -30,6 +30,7 @@ #include "Common/StringUtils.h" #include "Common/System/Display.h" #include "Common/System/System.h" +#include "Core/Config.h" #include "Core/Core.h" #include "Core/Reporting.h" #include "Core/Screenshot.h" diff --git a/UI/Store.cpp b/UI/Store.cpp index ab40825e93..8329ed22d9 100644 --- a/UI/Store.cpp +++ b/UI/Store.cpp @@ -22,7 +22,6 @@ #include "Common/UI/ViewGroup.h" #include "Common/Render/DrawBuffer.h" -#include "Common/Common.h" #include "Common/Log.h" #include "Common/Data/Text/I18n.h" #include "Common/Data/Format/JSONReader.h" diff --git a/UI/TiltAnalogSettingsScreen.h b/UI/TiltAnalogSettingsScreen.h index 41692bb46f..3aeece6eb9 100644 --- a/UI/TiltAnalogSettingsScreen.h +++ b/UI/TiltAnalogSettingsScreen.h @@ -17,20 +17,19 @@ #pragma once -#include - #include "Common/UI/View.h" #include "MiscScreens.h" class TiltAnalogSettingsScreen : public UIDialogScreenWithBackground { public: - TiltAnalogSettingsScreen() : currentTiltX_(0), currentTiltY_(0) {} + TiltAnalogSettingsScreen() {} void CreateViews() override; bool axis(const AxisInput &axis) override; private: UI::EventReturn OnCalibrate(UI::EventParams &e); - float currentTiltX_, currentTiltY_; + float currentTiltX_ = 0.0f; + float currentTiltY_ = 0.0f; }; diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index a6800972a0..b52b09f7a8 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -24,7 +24,7 @@ #include "Common/Math/math_util.h" #include "Common/UI/Context.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Core/Config.h" #include "Core/System.h" diff --git a/UI/TouchControlLayoutScreen.h b/UI/TouchControlLayoutScreen.h index 89305ab7d6..3db9394258 100644 --- a/UI/TouchControlLayoutScreen.h +++ b/UI/TouchControlLayoutScreen.h @@ -17,9 +17,6 @@ #pragma once -#include -#include - #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" #include "MiscScreens.h" diff --git a/UWP/App.cpp b/UWP/App.cpp index 2077d27a8c..9313302195 100644 --- a/UWP/App.cpp +++ b/UWP/App.cpp @@ -9,6 +9,7 @@ #include "Common/System/NativeApp.h" #include "Common/System/System.h" #include "Core/System.h" +#include "Core/Config.h" #include "Core/Core.h" #include diff --git a/Windows/GEDebugger/SimpleGLWindow.cpp b/Windows/GEDebugger/SimpleGLWindow.cpp index b8c26069cf..e04053ed3d 100644 --- a/Windows/GEDebugger/SimpleGLWindow.cpp +++ b/Windows/GEDebugger/SimpleGLWindow.cpp @@ -20,7 +20,7 @@ #include "Common/Math/lin/matrix4x4.h" #include "Common/GPU/OpenGL/GLSLProgram.h" #include "Common/GPU/OpenGL/GLFeatures.h" -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/Log.h" #include "Windows/GEDebugger/SimpleGLWindow.h" #include "Windows/W32Util/ContextMenu.h" diff --git a/Windows/GEDebugger/TabState.cpp b/Windows/GEDebugger/TabState.cpp index 66eec95cff..0a6e32e177 100644 --- a/Windows/GEDebugger/TabState.cpp +++ b/Windows/GEDebugger/TabState.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Windows/resource.h" #include "Windows/InputBox.h" #include "Windows/GEDebugger/GEDebugger.h" diff --git a/Windows/GEDebugger/TabVertices.cpp b/Windows/GEDebugger/TabVertices.cpp index 580012d2fc..f6d7e316ed 100644 --- a/Windows/GEDebugger/TabVertices.cpp +++ b/Windows/GEDebugger/TabVertices.cpp @@ -15,7 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Core/System.h" #include "Windows/resource.h" #include "Windows/GEDebugger/GEDebugger.h" diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index f04ccdb20b..64135d2fca 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include "Common/System/Display.h" diff --git a/Windows/MainWindow.h b/Windows/MainWindow.h index 2e512a561d..abf170fb84 100644 --- a/Windows/MainWindow.h +++ b/Windows/MainWindow.h @@ -5,7 +5,6 @@ #if !PPSSPP_PLATFORM(UWP) #include "Common/CommonWindows.h" -#include #include "Core/System.h" #include "MainWindowMenu.h" diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 1873870cfe..f83ecf8df0 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -1,7 +1,7 @@ #include "ppsspp_config.h" -#include #include #include +#include #include "CommonWindows.h" #include diff --git a/Windows/WASAPIStream.cpp b/Windows/WASAPIStream.cpp index f88b6c10e9..a80155cb0d 100644 --- a/Windows/WASAPIStream.cpp +++ b/Windows/WASAPIStream.cpp @@ -3,6 +3,7 @@ #include "WindowsAudio.h" #include "WASAPIStream.h" #include "Common/Log.h" +#include "Core/Config.h" #include "Core/Reporting.h" #include "Core/Util/AudioFormat.h" #include "Common/Data/Encoding/Utf8.h" diff --git a/Windows/WindowsAudio.h b/Windows/WindowsAudio.h index 9adc196c01..af216ba983 100644 --- a/Windows/WindowsAudio.h +++ b/Windows/WindowsAudio.h @@ -1,7 +1,6 @@ #pragma once #include "Common/CommonWindows.h" -#include "Core/Config.h" #include "Core/ConfigValues.h" // Always 2 channels. diff --git a/android/jni/AndroidEGLContext.cpp b/android/jni/AndroidEGLContext.cpp index 55d54dff77..2c7f5b1093 100644 --- a/android/jni/AndroidEGLContext.cpp +++ b/android/jni/AndroidEGLContext.cpp @@ -5,6 +5,7 @@ #include "Common/System/System.h" #include "AndroidEGLContext.h" #include "GL/GLInterface/EGLAndroid.h" +#include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" diff --git a/android/jni/AndroidJavaGLContext.cpp b/android/jni/AndroidJavaGLContext.cpp index 9fefc59c90..c435ee4451 100644 --- a/android/jni/AndroidJavaGLContext.cpp +++ b/android/jni/AndroidJavaGLContext.cpp @@ -2,6 +2,7 @@ #include "Common/System/Display.h" #include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/Log.h" +#include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" diff --git a/android/jni/AndroidJavaGLContext.h b/android/jni/AndroidJavaGLContext.h index 69f8d2bb40..e952de8acc 100644 --- a/android/jni/AndroidJavaGLContext.h +++ b/android/jni/AndroidJavaGLContext.h @@ -1,9 +1,5 @@ #pragma once -#include -#include -#include - #include "AndroidGraphicsContext.h" #include "Common/GPU/OpenGL/GLRenderManager.h" #include "Common/GPU/thin3d_create.h" diff --git a/android/jni/app-android.h b/android/jni/app-android.h index 9c78672561..c3d7e6b9a6 100644 --- a/android/jni/app-android.h +++ b/android/jni/app-android.h @@ -3,7 +3,6 @@ #include "ppsspp_config.h" #include -#include #include #include "Common/LogManager.h" diff --git a/headless/SDLHeadlessHost.cpp b/headless/SDLHeadlessHost.cpp index 3f53c01b91..4e7b76d135 100644 --- a/headless/SDLHeadlessHost.cpp +++ b/headless/SDLHeadlessHost.cpp @@ -25,18 +25,12 @@ #include "Common/GPU/OpenGL/GLFeatures.h" #include "Common/GPU/thin3d_create.h" #include "Common/GPU/OpenGL/GLRenderManager.h" - #include "Common/File/VFS/VFS.h" #include "Common/File/VFS/AssetReader.h" -#include "Common/Log.h" -#include "Common/File/FileUtil.h" #include "Common/GraphicsContext.h" #include "Common/TimeUtil.h" - -#include "Core/CoreParameter.h" -#include "Core/ConfigValues.h" +#include "Core/Config.h" #include "Core/System.h" -#include "GPU/Common/GPUDebugInterface.h" #include "GPU/GPUState.h" const bool WINDOW_VISIBLE = false; diff --git a/unittest/TestVertexJit.cpp b/unittest/TestVertexJit.cpp index f1ea248b21..17e63651d2 100644 --- a/unittest/TestVertexJit.cpp +++ b/unittest/TestVertexJit.cpp @@ -17,7 +17,7 @@ #include -#include "Common/Common.h" +#include "Common/CommonTypes.h" #include "Common/TimeUtil.h" #include "Core/Config.h" #include "Core/ConfigValues.h" From edcc1a7104bd316fbaedede7cbb7a890cdd9f0b2 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Jan 2022 22:06:54 -0800 Subject: [PATCH 4/4] HLE: Fix some type convert warnings. Almost missed these. --- Core/HLE/sceMp4.cpp | 2 +- Core/HLE/scePower.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceMp4.cpp b/Core/HLE/sceMp4.cpp index 3c214404a7..3dac7acacd 100644 --- a/Core/HLE/sceMp4.cpp +++ b/Core/HLE/sceMp4.cpp @@ -252,7 +252,7 @@ static u32 sceAacInit(u32 id) aac->Channels = 2; aac->MaxOutputSample = aac->PCMBufSize / 4; - aac->SetReadPos(aac->startPos); + aac->SetReadPos((int)aac->startPos); aac->audioType = PSP_CODEC_AAC; // create aac decoder diff --git a/Core/HLE/scePower.cpp b/Core/HLE/scePower.cpp index 2fd7259e70..f96c2f8e82 100644 --- a/Core/HLE/scePower.cpp +++ b/Core/HLE/scePower.cpp @@ -81,7 +81,7 @@ int PowerCpuMhzToHz(int desired, int pllHz) { } // We match the PSP's HLE funcs better when we have the same float error, it seems. - return (float)(freq / 1000000.0f) * 1000000; + return (int)((float)(freq / 1000000.0f) * 1000000); } int PowerPllMhzToHz(int mhz) {