diff --git a/Common/ColorConv.cpp b/Common/ColorConv.cpp index 449dd7b7f5..0e48cca0bc 100644 --- a/Common/ColorConv.cpp +++ b/Common/ColorConv.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 "ppsspp_config.h" #include "Common/Data/Convert/SmallDataConvert.h" #include "ColorConv.h" // NEON is in a separate file so that it can be compiled with a runtime check. diff --git a/Common/GPU/D3D11/D3D11Loader.cpp b/Common/GPU/D3D11/D3D11Loader.cpp index 2d81727ddb..0dbea80994 100644 --- a/Common/GPU/D3D11/D3D11Loader.cpp +++ b/Common/GPU/D3D11/D3D11Loader.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include "Common/GPU/D3D11/D3D11Loader.h" #if PPSSPP_PLATFORM(UWP) diff --git a/Common/GPU/Vulkan/VulkanLoader.cpp b/Common/GPU/Vulkan/VulkanLoader.cpp index 76d94545bb..70e2abcd52 100644 --- a/Common/GPU/Vulkan/VulkanLoader.cpp +++ b/Common/GPU/Vulkan/VulkanLoader.cpp @@ -15,11 +15,12 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include "Common/GPU/Vulkan/VulkanLoader.h" +#include "ppsspp_config.h" #include #include #include +#include "Common/GPU/Vulkan/VulkanLoader.h" #include "Common/Log.h" #include "Common/System/System.h" @@ -239,7 +240,7 @@ static const char *device_name_blacklist[] = { static const char *so_names[] = { #ifdef IOS "@executable_path/Frameworks/libMoltenVK.dylib", -#elif defined(PPSSPP_PLATFORM_MAC) +#elif PPSSPP_PLATFORM(MAC) "@executable_path/../Frameworks/libMoltenVK.dylib", #else "libvulkan.so", diff --git a/Common/Math/fast/fast_math.c b/Common/Math/fast/fast_math.c index 9cc9e0728b..707069dd54 100644 --- a/Common/Math/fast/fast_math.c +++ b/Common/Math/fast/fast_math.c @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include "fast_math.h" #include "fast_matrix.h" diff --git a/Common/MipsCPUDetect.cpp b/Common/MipsCPUDetect.cpp index eb35259d3a..9f2c1a1835 100644 --- a/Common/MipsCPUDetect.cpp +++ b/Common/MipsCPUDetect.cpp @@ -15,7 +15,8 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ -#ifdef __mips__ +#include "ppsspp_config.h" +#if PPSSPP_ARCH(MIPS) || PPSSPP_ARCH(MIPS64) #include "Common/Common.h" #include "Common/CPUDetect.h" @@ -202,4 +203,4 @@ std::string CPUInfo::Summarize() return sum; } -#endif // __mips__ +#endif // PPSSPP_ARCH(MIPS) || PPSSPP_ARCH(MIPS64) diff --git a/Common/Render/Text/draw_text_android.cpp b/Common/Render/Text/draw_text_android.cpp index 7e6a66d85f..16241818ad 100644 --- a/Common/Render/Text/draw_text_android.cpp +++ b/Common/Render/Text/draw_text_android.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include "Common/Log.h" #include "Common/StringUtils.h" #include "Common/System/Display.h" diff --git a/Common/Render/Text/draw_text_uwp.cpp b/Common/Render/Text/draw_text_uwp.cpp index 7ec375ae54..6f5088619f 100644 --- a/Common/Render/Text/draw_text_uwp.cpp +++ b/Common/Render/Text/draw_text_uwp.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include "Common/System/Display.h" #include "Common/GPU/thin3d.h" #include "Common/Data/Hash/Hash.h" diff --git a/Common/Render/Text/draw_text_win.cpp b/Common/Render/Text/draw_text_win.cpp index e7518857ef..1a79f6a192 100644 --- a/Common/Render/Text/draw_text_win.cpp +++ b/Common/Render/Text/draw_text_win.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include "Common/System/Display.h" #include "Common/GPU/thin3d.h" #include "Common/Data/Hash/Hash.h" diff --git a/Core/Debugger/SymbolMap.cpp b/Core/Debugger/SymbolMap.cpp index d5949d6a62..772f5ca1b5 100644 --- a/Core/Debugger/SymbolMap.cpp +++ b/Core/Debugger/SymbolMap.cpp @@ -21,6 +21,7 @@ #pragma optimize("gty", on) #endif +#include "ppsspp_config.h" #ifdef _WIN32 #include "Common/CommonWindows.h" #include diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 3c499cf115..fd2cd25252 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.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 "ppsspp_config.h" #include #include "Common/Data/Text/I18n.h" diff --git a/Core/HLE/sceUsbMic.cpp b/Core/HLE/sceUsbMic.cpp index 9f82234c6f..49e2aec844 100644 --- a/Core/HLE/sceUsbMic.cpp +++ b/Core/HLE/sceUsbMic.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 "ppsspp_config.h" #include #include diff --git a/Core/HW/Camera.cpp b/Core/HW/Camera.cpp index 415ac0a190..0339fe4d67 100644 --- a/Core/HW/Camera.cpp +++ b/Core/HW/Camera.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 "ppsspp_config.h" #include "Camera.h" #include "Core/Config.h" diff --git a/Core/HW/StereoResampler.cpp b/Core/HW/StereoResampler.cpp index f13e21554b..6f40d310f3 100644 --- a/Core/HW/StereoResampler.cpp +++ b/Core/HW/StereoResampler.cpp @@ -32,6 +32,7 @@ #define CONTROL_FACTOR 0.2f // in freq_shift per fifo size offset #define CONTROL_AVG 32.0f +#include "ppsspp_config.h" #include #include diff --git a/Core/Instance.cpp b/Core/Instance.cpp index 355edb4a5b..1e7dad0ad8 100644 --- a/Core/Instance.cpp +++ b/Core/Instance.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 "Instance.h" +#include "ppsspp_config.h" +#include "Core/Instance.h" #if !PPSSPP_PLATFORM(WINDOWS) && !PPSSPP_PLATFORM(ANDROID) && !defined(__LIBRETRO__) #include diff --git a/Core/MIPS/JitCommon/JitBlockCache.cpp b/Core/MIPS/JitCommon/JitBlockCache.cpp index 2195b5f10d..3f5e797312 100644 --- a/Core/MIPS/JitCommon/JitBlockCache.cpp +++ b/Core/MIPS/JitCommon/JitBlockCache.cpp @@ -15,13 +15,7 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -// Enable define below to enable oprofile integration. For this to work, -// it requires at least oprofile version 0.9.4, and changing the build -// system to link the Dolphin executable against libopagent. Since the -// dependency is a little inconvenient and this is possibly a slight -// performance hit, it's not enabled by default, but it's useful for -// locating performance issues. - +#include "ppsspp_config.h" #include #include @@ -45,6 +39,12 @@ // #include "JitBase.h" +// Enable define below to enable oprofile integration. For this to work, +// it requires at least oprofile version 0.9.4, and changing the build +// system to link the Dolphin executable against libopagent. Since the +// dependency is a little inconvenient and this is possibly a slight +// performance hit, it's not enabled by default, but it's useful for +// locating performance issues. #if defined USE_OPROFILE && USE_OPROFILE #include diff --git a/Core/MIPS/JitCommon/JitCommon.cpp b/Core/MIPS/JitCommon/JitCommon.cpp index 8ecd3a34d5..8c7aecf905 100644 --- a/Core/MIPS/JitCommon/JitCommon.cpp +++ b/Core/MIPS/JitCommon/JitCommon.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 "ppsspp_config.h" #include #include "ext/disarm.h" diff --git a/Core/MIPS/JitCommon/JitState.cpp b/Core/MIPS/JitCommon/JitState.cpp index d564b57d52..08ce7926f9 100644 --- a/Core/MIPS/JitCommon/JitState.cpp +++ b/Core/MIPS/JitCommon/JitState.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 "ppsspp_config.h" #include "Common/CPUDetect.h" #include "Core/Config.h" #include "Core/MIPS/JitCommon/JitState.h" diff --git a/Core/TextureReplacer.cpp b/Core/TextureReplacer.cpp index 517c799d65..8969267b67 100644 --- a/Core/TextureReplacer.cpp +++ b/Core/TextureReplacer.cpp @@ -15,9 +15,9 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include - +#include "ppsspp_config.h" #include +#include #include "ext/xxhash.h" diff --git a/Core/Util/AudioFormat.cpp b/Core/Util/AudioFormat.cpp index 54610949f3..e118c509b4 100644 --- a/Core/Util/AudioFormat.cpp +++ b/Core/Util/AudioFormat.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 "ppsspp_config.h" #include "Common/Common.h" #include "Common/CPUDetect.h" #include "Core/Util/AudioFormat.h" diff --git a/GPU/Common/TextureDecoder.cpp b/GPU/Common/TextureDecoder.cpp index f02094bfcd..2e10ac1f36 100644 --- a/GPU/Common/TextureDecoder.cpp +++ b/GPU/Common/TextureDecoder.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 "ppsspp_config.h" #include "ext/xxhash.h" #include "Common/CPUDetect.h" #include "Common/ColorConv.h" diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index b8066fec7b..4378047067 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include #include #include diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 029b2ccfb1..5d5fa76f0c 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -1,5 +1,6 @@ #pragma once +#include "ppsspp_config.h" #include "Common/Common.h" #include "Common/MemoryUtil.h" #include "GPU/GPUInterface.h" diff --git a/GPU/GPUState.cpp b/GPU/GPUState.cpp index bc62a3661b..1aa5050d6b 100644 --- a/GPU/GPUState.cpp +++ b/GPU/GPUState.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 "ppsspp_config.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 38258740ce..964a61880d 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -1,4 +1,5 @@ // Qt Desktop UI: works on Linux, Windows and Mac OSX +#include "ppsspp_config.h" #include "mainwindow.h" #include diff --git a/SDL/SDLCocoaMetalLayer.mm b/SDL/SDLCocoaMetalLayer.mm index c45158ff5d..cb7bd55192 100644 --- a/SDL/SDLCocoaMetalLayer.mm +++ b/SDL/SDLCocoaMetalLayer.mm @@ -1,4 +1,5 @@ -#if defined(PPSSPP_PLATFORM_MAC) +#include "ppsspp_config.h" +#if PPSSPP_PLATFORM(MAC) #import #else #import @@ -9,7 +10,7 @@ void *makeWindowMetalCompatible(void *window) { // https://github.com/KhronosGroup/MoltenVK/issues/78#issuecomment-371118536 -#if defined(PPSSPP_PLATFORM_MAC) +#if PPSSPP_PLATFORM(MAC) NSView *view = ((NSWindow *)window).contentView; assert([view isKindOfClass:[NSView class]]); diff --git a/SDL/SDLVulkanGraphicsContext.cpp b/SDL/SDLVulkanGraphicsContext.cpp index d8cf460bfc..433f35b03f 100644 --- a/SDL/SDLVulkanGraphicsContext.cpp +++ b/SDL/SDLVulkanGraphicsContext.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Common/System/System.h" @@ -93,7 +94,7 @@ bool SDLVulkanGraphicsContext::Init(SDL_Window *&window, int x, int y, int mode, break; #endif #if defined(VK_USE_PLATFORM_METAL_EXT) -#if defined(PPSSPP_PLATFORM_MAC) +#if PPSSPP_PLATFORM(MAC) case SDL_SYSWM_COCOA: vulkan_->InitSurface(WINDOWSYSTEM_METAL_EXT, makeWindowMetalCompatible(sys_info.info.cocoa.window), nullptr); break; diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 0ef83bcf2b..02ee1851c4 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.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 "ppsspp_config.h" #include #include #include diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index 6d95c6a18e..d081ba11a6 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.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 "ppsspp_config.h" #include "ext/xxhash.h" #include "Common/UI/UI.h" diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index a5711a94eb..d1c12a33a6 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include #include #include diff --git a/Windows/main.h b/Windows/main.h index a47bc081b5..8f04b0ede4 100644 --- a/Windows/main.h +++ b/Windows/main.h @@ -18,6 +18,7 @@ #pragma once +#include "ppsspp_config.h" #include "Debugger/Debugger_Disasm.h" #include "Debugger/Debugger_MemoryDlg.h" #include "Common/CommonWindows.h" diff --git a/headless/WindowsHeadlessHost.cpp b/headless/WindowsHeadlessHost.cpp index 27b06ea7b7..98ea0a4462 100644 --- a/headless/WindowsHeadlessHost.cpp +++ b/headless/WindowsHeadlessHost.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 "ppsspp_config.h" #include #include "headless/WindowsHeadlessHost.h" diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index bb08d3b619..9751924cb9 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include #include #include