From ff3d799871aa24702812449c2e53533cfdef5ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 31 Aug 2017 16:43:29 +0200 Subject: [PATCH 1/4] Remove snprintf compatibility hacks for MSVC versions before 2015 --- Common/CommonFuncs.h | 4 ---- Core/HLE/sceKernelMemory.cpp | 2 -- UI/DevScreens.cpp | 1 - UWP/NativeUWP/NativeUWP.vcxproj | 4 +--- UWP/NativeUWP/NativeUWP.vcxproj.filters | 8 +------ Windows/Debugger/BreakpointWindow.cpp | 4 +--- ext/native/Android.mk | 1 - ext/native/base/compat.cpp | 28 ------------------------- ext/native/base/compat.h | 11 ---------- ext/native/base/logging.h | 1 - ext/native/math/lin/matrix4x4.cpp | 3 +-- ext/native/native.vcxproj | 4 +--- ext/native/native.vcxproj.filters | 8 +------ 13 files changed, 6 insertions(+), 73 deletions(-) delete mode 100644 ext/native/base/compat.cpp delete mode 100644 ext/native/base/compat.h diff --git a/Common/CommonFuncs.h b/Common/CommonFuncs.h index c8905fb6ce..7b69903df8 100644 --- a/Common/CommonFuncs.h +++ b/Common/CommonFuncs.h @@ -17,12 +17,8 @@ #pragma once -#include "base/compat.h" #include "CommonTypes.h" -template struct CompileTimeAssert; -template<> struct CompileTimeAssert {}; - #ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) #endif diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index 6c5a0f67b1..ab71ca4d67 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -20,8 +20,6 @@ #include #include -#include "base/compat.h" - #include "Common/ChunkFile.h" #include "Core/HLE/HLE.h" #include "Core/HLE/FunctionWrappers.h" diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 3ee7ae86fe..12038d3dd5 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -17,7 +17,6 @@ #include -#include "base/compat.h" #include "gfx_es2/gpu_features.h" #include "i18n/i18n.h" #include "ui/ui_context.h" diff --git a/UWP/NativeUWP/NativeUWP.vcxproj b/UWP/NativeUWP/NativeUWP.vcxproj index c03420e802..9c2153302f 100644 --- a/UWP/NativeUWP/NativeUWP.vcxproj +++ b/UWP/NativeUWP/NativeUWP.vcxproj @@ -304,7 +304,6 @@ - @@ -394,7 +393,6 @@ - @@ -1317,4 +1315,4 @@ - \ No newline at end of file + diff --git a/UWP/NativeUWP/NativeUWP.vcxproj.filters b/UWP/NativeUWP/NativeUWP.vcxproj.filters index 04fe80993b..b009776eec 100644 --- a/UWP/NativeUWP/NativeUWP.vcxproj.filters +++ b/UWP/NativeUWP/NativeUWP.vcxproj.filters @@ -70,9 +70,6 @@ base - - base - base @@ -476,9 +473,6 @@ base - - base - base @@ -726,4 +720,4 @@ gfx - \ No newline at end of file + diff --git a/Windows/Debugger/BreakpointWindow.cpp b/Windows/Debugger/BreakpointWindow.cpp index 7c17fb64d5..b00da57324 100644 --- a/Windows/Debugger/BreakpointWindow.cpp +++ b/Windows/Debugger/BreakpointWindow.cpp @@ -1,12 +1,10 @@ -#include +#include -#include "base/compat.h" #include "util/text/utf8.h" #include "BreakpointWindow.h" #include "../resource.h" - BreakpointWindow* BreakpointWindow::bp; INT_PTR CALLBACK BreakpointWindow::dlgFunc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) diff --git a/ext/native/Android.mk b/ext/native/Android.mk index 4ff5c8005d..14310e2276 100644 --- a/ext/native/Android.mk +++ b/ext/native/Android.mk @@ -9,7 +9,6 @@ LOCAL_ARM_MODE := arm LOCAL_SRC_FILES :=\ base/backtrace.cpp \ base/buffer.cpp \ - base/compat.cpp \ base/display.cpp \ base/timeutil.cpp \ base/colorutil.cpp \ diff --git a/ext/native/base/compat.cpp b/ext/native/base/compat.cpp deleted file mode 100644 index cef9d6c008..0000000000 --- a/ext/native/base/compat.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include - -#include "base/compat.h" - -#if defined(_MSC_VER) && _MSC_VER < 1900 - -static int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap) { - int count = -1; - if (size != 0) - count = _vsnprintf_s(str, size, _TRUNCATE, format, ap); - if (count == -1) - count = _vscprintf(format, ap); - return count; -} - -int c99_snprintf(char* str, size_t size, const char* format, ...) { - int count; - va_list ap; - - va_start(ap, format); - count = c99_vsnprintf(str, size, format, ap); - va_end(ap); - - return count; -} - -#endif \ No newline at end of file diff --git a/ext/native/base/compat.h b/ext/native/base/compat.h deleted file mode 100644 index e8e9621cf9..0000000000 --- a/ext/native/base/compat.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// Implement C99 functions and similar that are missing in MSVC. - -#if defined(_MSC_VER) && _MSC_VER < 1900 - -int c99_snprintf(char* str, size_t size, const char* format, ...); -#define snprintf c99_snprintf -#define vscprintf _vscprintf - -#endif \ No newline at end of file diff --git a/ext/native/base/logging.h b/ext/native/base/logging.h index 2054ae5d98..6650d865b9 100644 --- a/ext/native/base/logging.h +++ b/ext/native/base/logging.h @@ -4,7 +4,6 @@ #include "base/arch.h" #include "base/backtrace.h" -#include "base/compat.h" // Simple wrapper around Android's logging interface that also allows other // implementations, and also some misc utilities. diff --git a/ext/native/math/lin/matrix4x4.cpp b/ext/native/math/lin/matrix4x4.cpp index 703ed366c3..33d2714c6e 100644 --- a/ext/native/math/lin/matrix4x4.cpp +++ b/ext/native/math/lin/matrix4x4.cpp @@ -1,8 +1,7 @@ #include "math/lin/matrix4x4.h" -#include +#include -#include "base/compat.h" #include "math/lin/vec3.h" #include "math/lin/quat.h" #include "math/fast/fast_matrix.h" diff --git a/ext/native/native.vcxproj b/ext/native/native.vcxproj index cbee2ad055..ea47f94dea 100644 --- a/ext/native/native.vcxproj +++ b/ext/native/native.vcxproj @@ -196,7 +196,6 @@ - @@ -295,7 +294,6 @@ - @@ -758,4 +756,4 @@ - \ No newline at end of file + diff --git a/ext/native/native.vcxproj.filters b/ext/native/native.vcxproj.filters index 417a918213..e551ed8b0e 100644 --- a/ext/native/native.vcxproj.filters +++ b/ext/native/native.vcxproj.filters @@ -281,9 +281,6 @@ thread - - base - gfx @@ -736,9 +733,6 @@ thread - - base - base @@ -859,4 +853,4 @@ {06c6305a-a646-485b-85b9-645a24dd6553} - \ No newline at end of file + From 6a1fa728d85d9a13b575b84fa2360a25e50462f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 31 Aug 2017 17:13:18 +0200 Subject: [PATCH 2/4] Remove Globals.h --- CMakeLists.txt | 2 - Common/ChunkFile.h | 1 + Common/CodeBlock.h | 5 +- Common/Common.h | 20 +++---- Common/CommonFuncs.h | 1 + Common/FileUtil.h | 12 ++--- Common/Hashmaps.h | 2 + Common/LogManager.h | 6 ++- Common/Swap.h | 4 ++ Core/Dialog/PSPDialog.h | 1 + Core/Dialog/PSPMsgDialog.h | 2 + Core/ELF/ElfTypes.h | 1 + Core/ELF/PBPReader.h | 1 + Core/ELF/PrxDecrypter.cpp | 1 + Core/FileLoaders/DiskCachingFileLoader.h | 1 + Core/FileSystems/BlockDevices.cpp | 1 + Core/HLE/KernelWaitHelpers.h | 2 + Core/HLE/__sceAudio.cpp | 1 - Core/HLE/sceCtrl.cpp | 2 +- Core/HLE/sceKernel.h | 5 +- Core/HLE/sceMpeg.cpp | 2 +- Core/HLE/sceMpeg.h | 1 + Core/HW/SasAudio.cpp | 6 +-- Core/HW/SasReverb.cpp | 3 +- Core/HW/StereoResampler.cpp | 2 +- Core/MemMap.h | 1 + Core/Util/AudioFormat.cpp | 1 - Core/Util/AudioFormat.h | 28 +++++++++- GPU/Common/SplineCommon.h | 1 + GPU/Common/TextureDecoder.h | 1 + GPU/Common/VertexDecoderCommon.cpp | 1 + GPU/Common/VertexDecoderCommon.h | 1 - GPU/D3D11/FramebufferManagerD3D11.h | 2 - GPU/D3D11/ShaderManagerD3D11.h | 1 - GPU/Directx9/FramebufferDX9.h | 2 - GPU/Directx9/ShaderManagerDX9.h | 1 - GPU/Directx9/TextureCacheDX9.h | 1 - GPU/Directx9/VertexShaderGeneratorDX9.h | 2 - GPU/GLES/FragmentShaderGeneratorGLES.h | 2 - GPU/GLES/FramebufferManagerGLES.h | 4 +- GPU/GLES/ShaderManagerGLES.h | 4 +- GPU/GLES/TextureCacheGLES.h | 1 - GPU/GPUInterface.h | 1 + GPU/GPUState.h | 4 +- GPU/Math3D.h | 3 +- GPU/Vulkan/FragmentShaderGeneratorVulkan.h | 2 - GPU/Vulkan/ShaderManagerVulkan.h | 1 - GPU/Vulkan/TextureCacheVulkan.h | 1 - Globals.h | 63 ---------------------- Windows/Debugger/CtrlDisAsmView.cpp | 1 - Windows/Debugger/CtrlMemView.cpp | 2 - Windows/Debugger/CtrlRegisterList.cpp | 1 - Windows/Debugger/Debugger_Disasm.h | 1 - Windows/EmuThread.cpp | 1 - Windows/GEDebugger/CtrlDisplayListView.h | 1 - Windows/GEDebugger/GEDebugger.h | 1 - Windows/GEDebugger/SimpleGLWindow.h | 1 - Windows/GEDebugger/TabDisplayLists.h | 1 - Windows/Globals.cpp | 29 ---------- Windows/InputBox.cpp | 1 + Windows/InputBox.h | 2 - Windows/MainWindow.cpp | 2 - Windows/PPSSPP.vcxproj | 2 - Windows/PPSSPP.vcxproj.filters | 2 - Windows/main.cpp | 3 ++ ext/native/base/basictypes.h | 25 +++------ headless/Compare.h | 2 +- 67 files changed, 99 insertions(+), 193 deletions(-) delete mode 100644 Globals.h delete mode 100644 Windows/Globals.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 445148703a..f9d872f953 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,7 +140,6 @@ if(APPLE) find_library(COCOA_LIBRARY Cocoa) endif() -# Needed for Globals.h include_directories("${CMAKE_SOURCE_DIR}") if(USING_EGL) @@ -1604,7 +1603,6 @@ add_library(${CoreLibName} ${CoreLinkType} Core/Util/ppge_atlas.h ${CORE_NEON} ${GPU_SOURCES} - Globals.h git-version.cpp ext/disarm.cpp git-version.cpp) diff --git a/Common/ChunkFile.h b/Common/ChunkFile.h index e1f3986d59..1820dc2192 100644 --- a/Common/ChunkFile.h +++ b/Common/ChunkFile.h @@ -37,6 +37,7 @@ #include #include "Common.h" +#include "Swap.h" #include "FileUtil.h" template diff --git a/Common/CodeBlock.h b/Common/CodeBlock.h index 9887385548..03ae3f8606 100644 --- a/Common/CodeBlock.h +++ b/Common/CodeBlock.h @@ -38,8 +38,11 @@ protected: size_t region_size; }; -template class CodeBlock : public CodeBlockCommon, public T, NonCopyable { +template class CodeBlock : public CodeBlockCommon, public T { private: + CodeBlock(const CodeBlock &) = delete; + void operator=(const CodeBlock &) = delete; + // A privately used function to set the executable RAM space to something invalid. // For debugging usefulness it should be used to set the RAM to a host specific breakpoint instruction virtual void PoisonMemory(int offset) = 0; diff --git a/Common/Common.h b/Common/Common.h index 99b1deed1d..187b36858a 100644 --- a/Common/Common.h +++ b/Common/Common.h @@ -20,7 +20,6 @@ // DO NOT EVER INCLUDE directly _or indirectly_ from this file // since it slows down the build a lot. -#include #include #ifdef _MSC_VER @@ -36,19 +35,16 @@ #define STACKALIGN -// An inheritable class to disallow the copy constructor and operator= functions -class NonCopyable { -protected: - NonCopyable() {} -private: - NonCopyable(const NonCopyable&); - void operator=(const NonCopyable&); -}; - #include "Log.h" #include "CommonTypes.h" #include "CommonFuncs.h" +#ifndef DISALLOW_COPY_AND_ASSIGN +#define DISALLOW_COPY_AND_ASSIGN(t) \ + t(const t &other) = delete; \ + void operator =(const t &other) = delete; +#endif + #ifdef __APPLE__ // The Darwin ABI requires that stack frames be aligned to 16-byte boundaries. // This is only needed on i386 gcc - x86_64 already aligns to 16 bytes. @@ -100,6 +96,4 @@ private: # elif defined __SSE2__ # define _M_SSE 0x200 # endif -#endif - -#include "Swap.h" +#endif \ No newline at end of file diff --git a/Common/CommonFuncs.h b/Common/CommonFuncs.h index 7b69903df8..77f466bcd4 100644 --- a/Common/CommonFuncs.h +++ b/Common/CommonFuncs.h @@ -25,6 +25,7 @@ #if !defined(_WIN32) + #include #include diff --git a/Common/FileUtil.h b/Common/FileUtil.h index 5a0a9cb1f3..07ac398fb7 100644 --- a/Common/FileUtil.h +++ b/Common/FileUtil.h @@ -124,14 +124,17 @@ const std::string &GetExeDirectory(); // simple wrapper for cstdlib file functions to // hopefully will make error checking easier // and make forgetting an fclose() harder -class IOFile : NonCopyable { +class IOFile { public: IOFile(); IOFile(std::FILE* file); IOFile(const std::string& filename, const char openmode[]); - ~IOFile(); + // Prevent copies. + IOFile(const IOFile &) = delete; + void operator=(const IOFile &) = delete; + bool Open(const std::string& filename, const char openmode[]); bool Close(); @@ -189,10 +192,7 @@ public: } private: - IOFile& operator=(const IOFile&) /*= delete*/; - IOFile(const IOFile&) /*= delete*/; - - std::FILE* m_file; + std::FILE *m_file; bool m_good; }; diff --git a/Common/Hashmaps.h b/Common/Hashmaps.h index b9cd553996..c8ec27bb09 100644 --- a/Common/Hashmaps.h +++ b/Common/Hashmaps.h @@ -1,6 +1,8 @@ #pragma once #include +#include + #include "ext/xxhash.h" #include "Common/CommonFuncs.h" diff --git a/Common/LogManager.h b/Common/LogManager.h index f5fbd3c9d5..3a778ba11c 100644 --- a/Common/LogManager.h +++ b/Common/LogManager.h @@ -103,11 +103,15 @@ struct LogChannel { class ConsoleListener; -class LogManager : NonCopyable { +class LogManager { private: LogManager(); ~LogManager(); + // Prevent copies. + LogManager(const LogManager &) = delete; + void operator=(const LogManager &) = delete; + LogChannel log_[LogTypes::NUMBER_OF_LOGS]; FileLogListener *fileLog_ = nullptr; ConsoleListener *consoleLog_ = nullptr; diff --git a/Common/Swap.h b/Common/Swap.h index 2109ba42a9..3a5d8ac027 100644 --- a/Common/Swap.h +++ b/Common/Swap.h @@ -17,6 +17,10 @@ #pragma once +#include + +#include "Common/CommonTypes.h" + // Android #if defined(__ANDROID__) #include diff --git a/Core/Dialog/PSPDialog.h b/Core/Dialog/PSPDialog.h index c08e5d8c2e..d7875078c3 100644 --- a/Core/Dialog/PSPDialog.h +++ b/Core/Dialog/PSPDialog.h @@ -19,6 +19,7 @@ #include "Common/Common.h" #include "Common/CommonTypes.h" +#include "Common/Swap.h" class PointerWrap; diff --git a/Core/Dialog/PSPMsgDialog.h b/Core/Dialog/PSPMsgDialog.h index ffebcaf635..864420f0f0 100644 --- a/Core/Dialog/PSPMsgDialog.h +++ b/Core/Dialog/PSPMsgDialog.h @@ -18,6 +18,8 @@ #pragma once #include + +#include "Common/Swap.h" #include "Core/Dialog/PSPDialog.h" #define SCE_UTILITY_MSGDIALOG_OPTION_ERRORSOUND 0x00000000 diff --git a/Core/ELF/ElfTypes.h b/Core/ELF/ElfTypes.h index 79dec51fb9..c3b9df4eb5 100644 --- a/Core/ELF/ElfTypes.h +++ b/Core/ELF/ElfTypes.h @@ -18,6 +18,7 @@ #pragma once #include "Common/Common.h" +#include "Common/Swap.h" /////////////////////// // ELF Header Constants diff --git a/Core/ELF/PBPReader.h b/Core/ELF/PBPReader.h index de3d714cc3..679cf6a516 100644 --- a/Core/ELF/PBPReader.h +++ b/Core/ELF/PBPReader.h @@ -19,6 +19,7 @@ #pragma once #include "Common/Common.h" +#include "Common/Swap.h" enum PBPSubFile { PBP_PARAM_SFO, diff --git a/Core/ELF/PrxDecrypter.cpp b/Core/ELF/PrxDecrypter.cpp index 566c6e1695..414f89ac0c 100644 --- a/Core/ELF/PrxDecrypter.cpp +++ b/Core/ELF/PrxDecrypter.cpp @@ -5,6 +5,7 @@ extern "C" #include "ext/libkirk/kirk_engine.h" } #include "Common/Common.h" +#include "Common/Swap.h" #include "Core/ELF/PrxDecrypter.h" #define ROUNDUP16(x) (((x)+15)&~15) diff --git a/Core/FileLoaders/DiskCachingFileLoader.h b/Core/FileLoaders/DiskCachingFileLoader.h index 2ae91d1f48..1ea27ee0cb 100644 --- a/Core/FileLoaders/DiskCachingFileLoader.h +++ b/Core/FileLoaders/DiskCachingFileLoader.h @@ -22,6 +22,7 @@ #include #include "Common/Common.h" +#include "Common/Swap.h" #include "Core/Loaders.h" class DiskCachingFileLoaderCache; diff --git a/Core/FileSystems/BlockDevices.cpp b/Core/FileSystems/BlockDevices.cpp index 7fc62c75f4..10d5b74fbe 100644 --- a/Core/FileSystems/BlockDevices.cpp +++ b/Core/FileSystems/BlockDevices.cpp @@ -17,6 +17,7 @@ #include "Common/FileUtil.h" +#include "Common/Swap.h" #include "Core/Loaders.h" #include "Core/FileSystems/BlockDevices.h" #include diff --git a/Core/HLE/KernelWaitHelpers.h b/Core/HLE/KernelWaitHelpers.h index 8cbfef2170..499d340edb 100644 --- a/Core/HLE/KernelWaitHelpers.h +++ b/Core/HLE/KernelWaitHelpers.h @@ -20,6 +20,8 @@ #include #include #include + +#include "Common/CommonTypes.h" #include "Core/HLE/sceKernelThread.h" namespace HLEKernel diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index 1254fb221e..bf22b2d01b 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -18,7 +18,6 @@ #include #include -#include "Globals.h" // only for clamp_s16 #include "Common/CommonTypes.h" #include "Common/ChunkFile.h" #include "Common/FixedSizeQueue.h" diff --git a/Core/HLE/sceCtrl.cpp b/Core/HLE/sceCtrl.cpp index 705bf6590a..bc9e965af8 100644 --- a/Core/HLE/sceCtrl.cpp +++ b/Core/HLE/sceCtrl.cpp @@ -19,13 +19,13 @@ #include #include -#include "Globals.h" #include "Core/HLE/HLE.h" #include "Core/HLE/FunctionWrappers.h" #include "Core/MIPS/MIPS.h" #include "Core/CoreTiming.h" #include "Core/MemMapHelpers.h" #include "Common/ChunkFile.h" +#include "Core/Util/AudioFormat.h" // for clamp_u8 #include "Core/HLE/sceCtrl.h" #include "Core/HLE/sceDisplay.h" #include "Core/HLE/sceKernel.h" diff --git a/Core/HLE/sceKernel.h b/Core/HLE/sceKernel.h index 8bab1f3fcc..7bc309717f 100644 --- a/Core/HLE/sceKernel.h +++ b/Core/HLE/sceKernel.h @@ -20,12 +20,11 @@ #include #include "Common/Common.h" -#include "Common/CommonTypes.h" +#include "Common/Swap.h" class PointerWrap; -enum -{ +enum { SCE_KERNEL_ERROR_OK = 0, SCE_KERNEL_ERROR_ALREADY = 0x80000020, SCE_KERNEL_ERROR_BUSY = 0x80000021, diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 4e51cda3ed..592320515e 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -15,12 +15,12 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. - // This code is part shamelessly "inspired" from JPSCP. #include #include #include +#include "Common/Swap.h" #include "Core/HLE/sceMpeg.h" #include "Core/HLE/sceKernelModule.h" #include "Core/HLE/sceKernelThread.h" diff --git a/Core/HLE/sceMpeg.h b/Core/HLE/sceMpeg.h index 013e5a7b29..ca310bf409 100644 --- a/Core/HLE/sceMpeg.h +++ b/Core/HLE/sceMpeg.h @@ -18,6 +18,7 @@ #pragma once #include "Common/Common.h" +#include "Common/Swap.h" class PointerWrap; diff --git a/Core/HW/SasAudio.cpp b/Core/HW/SasAudio.cpp index aefd44690e..9bf5fd82ef 100644 --- a/Core/HW/SasAudio.cpp +++ b/Core/HW/SasAudio.cpp @@ -15,18 +15,18 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. +#include + #include "base/basictypes.h" #include "profiler/profiler.h" -#include "Globals.h" #include "Core/MemMapHelpers.h" #include "Core/HLE/sceAtrac.h" #include "Core/Config.h" #include "Core/Reporting.h" +#include "Core/Util/AudioFormat.h" #include "SasAudio.h" -#include - // #define AUDIO_TO_FILE static const u8 f[16][2] = { diff --git a/Core/HW/SasReverb.cpp b/Core/HW/SasReverb.cpp index fd9f592b8b..5b38ff23e3 100644 --- a/Core/HW/SasReverb.cpp +++ b/Core/HW/SasReverb.cpp @@ -18,9 +18,8 @@ #include #include "base/basictypes.h" -#include "Globals.h" #include "Core/HW/SasReverb.h" - +#include "Core/Util/AudioFormat.h" // This is under the assumption that the reverb used in Sas is the same as the PSX SPU reverb. diff --git a/Core/HW/StereoResampler.cpp b/Core/HW/StereoResampler.cpp index 477307a9f1..ca617d5b90 100644 --- a/Core/HW/StereoResampler.cpp +++ b/Core/HW/StereoResampler.cpp @@ -39,8 +39,8 @@ #include "Core/Config.h" #include "Core/HW/StereoResampler.h" #include "Core/HLE/__sceAudio.h" +#include "Core/Util/AudioFormat.h" // for clamp_u8 #include "Core/System.h" -#include "Globals.h" #ifdef _M_SSE #include diff --git a/Core/MemMap.h b/Core/MemMap.h index da7a52ea26..a681df9d11 100644 --- a/Core/MemMap.h +++ b/Core/MemMap.h @@ -27,6 +27,7 @@ // Includes #include "Common/Common.h" #include "Common/CommonTypes.h" +#include "Common/Swap.h" #include "Core/Opcode.h" // PPSSPP is very aggressive about trying to do memory accesses directly, for speed. diff --git a/Core/Util/AudioFormat.cpp b/Core/Util/AudioFormat.cpp index 24a76ed313..5806c2c51c 100644 --- a/Core/Util/AudioFormat.cpp +++ b/Core/Util/AudioFormat.cpp @@ -19,7 +19,6 @@ #include "Common/CPUDetect.h" #include "Core/Util/AudioFormat.h" #include "Core/Util/AudioFormatNEON.h" -#include "Globals.h" #ifdef _M_SSE #include diff --git a/Core/Util/AudioFormat.h b/Core/Util/AudioFormat.h index b39d3feaa6..841b8e634a 100644 --- a/Core/Util/AudioFormat.h +++ b/Core/Util/AudioFormat.h @@ -19,7 +19,33 @@ #include "ppsspp_config.h" #include "Common/Common.h" -#include "Globals.h" +#include "Common/CommonTypes.h" + +#define IS_LITTLE_ENDIAN (*(const u16 *)"\0\xff" >= 0x100) + +static inline u8 clamp_u8(int i) { +#if PPSSPP_ARCH(ARM) && !defined(_MSC_VER) + asm("usat %0, #8, %1" : "=r"(i) : "r"(i)); +#else + if (i > 255) + return 255; + if (i < 0) + return 0; +#endif + return i; +} + +static inline s16 clamp_s16(int i) { +#if PPSSPP_ARCH(ARM) && !defined(_MSC_VER) + asm("ssat %0, #16, %1" : "=r"(i) : "r"(i)); +#else + if (i > 32767) + return 32767; + if (i < -32768) + return -32768; +#endif + return i; +} static inline s16 ApplySampleVolume(s16 sample, int vol) { #if PPSSPP_ARCH(ARM) && !defined(_MSC_VER) diff --git a/GPU/Common/SplineCommon.h b/GPU/Common/SplineCommon.h index 5eecfb602b..e292c2b937 100644 --- a/GPU/Common/SplineCommon.h +++ b/GPU/Common/SplineCommon.h @@ -18,6 +18,7 @@ #pragma once #include "Common/CommonTypes.h" +#include "Common/Swap.h" #include "GPU/Math3D.h" #include "GPU/ge_constants.h" diff --git a/GPU/Common/TextureDecoder.h b/GPU/Common/TextureDecoder.h index 879c7a58d8..638f88b4ac 100644 --- a/GPU/Common/TextureDecoder.h +++ b/GPU/Common/TextureDecoder.h @@ -25,6 +25,7 @@ enum CheckAlphaResult { }; #include "Common/Common.h" +#include "Common/Swap.h" #include "Core/MemMap.h" #include "GPU/ge_constants.h" #include "GPU/Common/TextureDecoderNEON.h" diff --git a/GPU/Common/VertexDecoderCommon.cpp b/GPU/Common/VertexDecoderCommon.cpp index dd20eb3ea4..5ddcc18347 100644 --- a/GPU/Common/VertexDecoderCommon.cpp +++ b/GPU/Common/VertexDecoderCommon.cpp @@ -28,6 +28,7 @@ #include "Core/HDRemaster.h" #include "Core/Reporting.h" #include "Core/MIPS/JitCommon/JitCommon.h" +#include "Core/Util/AudioFormat.h" // for clamp_u8 #include "GPU/Common/ShaderCommon.h" #include "GPU/GPUState.h" #include "GPU/ge_constants.h" diff --git a/GPU/Common/VertexDecoderCommon.h b/GPU/Common/VertexDecoderCommon.h index 18d792b8bb..9222090480 100644 --- a/GPU/Common/VertexDecoderCommon.h +++ b/GPU/Common/VertexDecoderCommon.h @@ -37,7 +37,6 @@ #else #include "Common/FakeEmitter.h" #endif -#include "Globals.h" // DecVtxFormat - vertex formats for PC // Kind of like a D3D VertexDeclaration. diff --git a/GPU/D3D11/FramebufferManagerD3D11.h b/GPU/D3D11/FramebufferManagerD3D11.h index 6f188486d5..3e71678119 100644 --- a/GPU/D3D11/FramebufferManagerD3D11.h +++ b/GPU/D3D11/FramebufferManagerD3D11.h @@ -27,8 +27,6 @@ // Also provides facilities for drawing and later converting raw // pixel data. - -#include "Globals.h" #include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferCommon.h" #include "Core/Config.h" diff --git a/GPU/D3D11/ShaderManagerD3D11.h b/GPU/D3D11/ShaderManagerD3D11.h index 5deba0cae1..0681cfa8cb 100644 --- a/GPU/D3D11/ShaderManagerD3D11.h +++ b/GPU/D3D11/ShaderManagerD3D11.h @@ -22,7 +22,6 @@ #include #include "base/basictypes.h" -#include "Globals.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/ShaderId.h" #include "GPU/Common/ShaderUniforms.h" diff --git a/GPU/Directx9/FramebufferDX9.h b/GPU/Directx9/FramebufferDX9.h index 1b2ce4a045..f8960a4690 100644 --- a/GPU/Directx9/FramebufferDX9.h +++ b/GPU/Directx9/FramebufferDX9.h @@ -27,8 +27,6 @@ // Also provides facilities for drawing and later converting raw // pixel data. - -#include "Globals.h" #include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferCommon.h" #include "Core/Config.h" diff --git a/GPU/Directx9/ShaderManagerDX9.h b/GPU/Directx9/ShaderManagerDX9.h index 39932e6c91..d85806a8ff 100644 --- a/GPU/Directx9/ShaderManagerDX9.h +++ b/GPU/Directx9/ShaderManagerDX9.h @@ -21,7 +21,6 @@ #include #include "base/basictypes.h" -#include "Globals.h" #include "GPU/Directx9/VertexShaderGeneratorDX9.h" #include "GPU/Directx9/PixelShaderGeneratorDX9.h" #include "GPU/Common/ShaderCommon.h" diff --git a/GPU/Directx9/TextureCacheDX9.h b/GPU/Directx9/TextureCacheDX9.h index 5d82d144bf..ed8a406852 100644 --- a/GPU/Directx9/TextureCacheDX9.h +++ b/GPU/Directx9/TextureCacheDX9.h @@ -21,7 +21,6 @@ #include -#include "../Globals.h" #include "GPU/GPU.h" #include "GPU/GPUInterface.h" #include "GPU/Directx9/TextureScalerDX9.h" diff --git a/GPU/Directx9/VertexShaderGeneratorDX9.h b/GPU/Directx9/VertexShaderGeneratorDX9.h index 21601b989d..690e133979 100644 --- a/GPU/Directx9/VertexShaderGeneratorDX9.h +++ b/GPU/Directx9/VertexShaderGeneratorDX9.h @@ -17,8 +17,6 @@ #pragma once -#include "Globals.h" - #include "GPU/Common/ShaderID.h" namespace DX9 { diff --git a/GPU/GLES/FragmentShaderGeneratorGLES.h b/GPU/GLES/FragmentShaderGeneratorGLES.h index 534a3c8cb3..0e3f924b36 100644 --- a/GPU/GLES/FragmentShaderGeneratorGLES.h +++ b/GPU/GLES/FragmentShaderGeneratorGLES.h @@ -17,8 +17,6 @@ #pragma once -#include "Globals.h" - struct ShaderID; bool GenerateFragmentShader(const ShaderID &id, char *buffer); diff --git a/GPU/GLES/FramebufferManagerGLES.h b/GPU/GLES/FramebufferManagerGLES.h index 586a3ea681..54310facbf 100644 --- a/GPU/GLES/FramebufferManagerGLES.h +++ b/GPU/GLES/FramebufferManagerGLES.h @@ -26,11 +26,9 @@ // Also provides facilities for drawing and later converting raw // pixel data. - -#include "Globals.h" +#include "Core/Config.h" #include "GPU/GPUCommon.h" #include "GPU/Common/FramebufferCommon.h" -#include "Core/Config.h" struct GLSLProgram; class TextureCacheGLES; diff --git a/GPU/GLES/ShaderManagerGLES.h b/GPU/GLES/ShaderManagerGLES.h index 62a58c54a5..0f1065a25c 100644 --- a/GPU/GLES/ShaderManagerGLES.h +++ b/GPU/GLES/ShaderManagerGLES.h @@ -17,9 +17,9 @@ #pragma once -#include "base/basictypes.h" -#include "Globals.h" +#include +#include "base/basictypes.h" #include "Common/Hashmaps.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/ShaderId.h" diff --git a/GPU/GLES/TextureCacheGLES.h b/GPU/GLES/TextureCacheGLES.h index 0627b1dbb2..b7c1eeaeb3 100644 --- a/GPU/GLES/TextureCacheGLES.h +++ b/GPU/GLES/TextureCacheGLES.h @@ -21,7 +21,6 @@ #include "gfx_es2/gpu_features.h" #include "gfx/gl_common.h" -#include "Globals.h" #include "GPU/GPUInterface.h" #include "GPU/GPUState.h" #include "GPU/GLES/TextureScalerGLES.h" diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h index ceed93eb15..5faf3540bb 100644 --- a/GPU/GPUInterface.h +++ b/GPU/GPUInterface.h @@ -21,6 +21,7 @@ #include #include +#include "Common/Swap.h" #include "GPU/GPU.h" #include "Core/MemMap.h" #include "GPU/ge_constants.h" diff --git a/GPU/GPUState.h b/GPU/GPUState.h index 4af074e5ef..fa33a2a341 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -19,10 +19,10 @@ #include -#include "Globals.h" +#include "Common/Common.h" +#include "Common/Swap.h" #include "GPU/GPU.h" #include "GPU/ge_constants.h" -#include "Common/Common.h" #include "GPU/Common/ShaderCommon.h" class PointerWrap; diff --git a/GPU/Math3D.h b/GPU/Math3D.h index 8d24f0b437..1a6f75d7d3 100644 --- a/GPU/Math3D.h +++ b/GPU/Math3D.h @@ -18,9 +18,8 @@ #pragma once #include -#include "Globals.h" -#include "Common/Common.h" +#include "Common/Common.h" #include "math/fast/fast_matrix.h" #if defined(_M_SSE) diff --git a/GPU/Vulkan/FragmentShaderGeneratorVulkan.h b/GPU/Vulkan/FragmentShaderGeneratorVulkan.h index 666daea965..e5ec98771c 100644 --- a/GPU/Vulkan/FragmentShaderGeneratorVulkan.h +++ b/GPU/Vulkan/FragmentShaderGeneratorVulkan.h @@ -18,8 +18,6 @@ #pragma once -#include "Globals.h" - struct ShaderID; bool GenerateVulkanGLSLFragmentShader(const ShaderID &id, char *buffer); diff --git a/GPU/Vulkan/ShaderManagerVulkan.h b/GPU/Vulkan/ShaderManagerVulkan.h index 4499ee7381..0135b76141 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.h +++ b/GPU/Vulkan/ShaderManagerVulkan.h @@ -21,7 +21,6 @@ #include "base/basictypes.h" #include "Common/Hashmaps.h" -#include "Globals.h" #include "Common/Vulkan/VulkanMemory.h" #include "GPU/Common/ShaderCommon.h" #include "GPU/Common/ShaderId.h" diff --git a/GPU/Vulkan/TextureCacheVulkan.h b/GPU/Vulkan/TextureCacheVulkan.h index 6e076e59af..809606aa00 100644 --- a/GPU/Vulkan/TextureCacheVulkan.h +++ b/GPU/Vulkan/TextureCacheVulkan.h @@ -20,7 +20,6 @@ #include #include "Common/Hashmaps.h" -#include "Globals.h" #include "GPU/GPUInterface.h" #include "GPU/GPUState.h" #include "Common/Vulkan/VulkanContext.h" diff --git a/Globals.h b/Globals.h deleted file mode 100644 index 3cf4d4308a..0000000000 --- a/Globals.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2012- PPSSPP 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 or later versions. - -// 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 git repository and contact information can be found at -// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. - -#pragma once - -#include -#include -#include -#include -#include - -#include "ppsspp_config.h" - -#include "Common/Log.h" -#include "Common/CommonTypes.h" - -#define IS_LITTLE_ENDIAN (*(const u16 *)"\0\xff" >= 0x100) -#define IS_BIG_ENDIAN (*(const u16 *)"\0\xff" < 0x100) - -static inline u8 clamp_u8(int i) { -#if PPSSPP_ARCH(ARM) && !defined(_MSC_VER) - asm("usat %0, #8, %1" : "=r"(i) : "r"(i)); -#else - if (i > 255) - return 255; - if (i < 0) - return 0; -#endif - return i; -} - -static inline s16 clamp_s16(int i) { -#if PPSSPP_ARCH(ARM) && !defined(_MSC_VER) - asm("ssat %0, #16, %1" : "=r"(i) : "r"(i)); -#else - if (i > 32767) - return 32767; - if (i < -32768) - return -32768; -#endif - return i; -} - -#ifndef DISALLOW_COPY_AND_ASSIGN -#define DISALLOW_COPY_AND_ASSIGN(t) \ - private: \ - t(const t &other); \ - void operator =(const t &other); -#endif diff --git a/Windows/Debugger/CtrlDisAsmView.cpp b/Windows/Debugger/CtrlDisAsmView.cpp index 06248c4768..129d4a731a 100644 --- a/Windows/Debugger/CtrlDisAsmView.cpp +++ b/Windows/Debugger/CtrlDisAsmView.cpp @@ -16,7 +16,6 @@ #include "Windows/Debugger/DebuggerShared.h" #include "Windows/Debugger/BreakpointWindow.h" #include "Core/Debugger/SymbolMap.h" -#include "Globals.h" #include "Windows/main.h" #include "Common/CommonWindows.h" diff --git a/Windows/Debugger/CtrlMemView.cpp b/Windows/Debugger/CtrlMemView.cpp index 7bc643a7ea..4cede1270e 100644 --- a/Windows/Debugger/CtrlMemView.cpp +++ b/Windows/Debugger/CtrlMemView.cpp @@ -3,8 +3,6 @@ #include #include -#include "../../globals.h" - #include "Core/Config.h" #include "../resource.h" #include "../../Core/MemMap.h" diff --git a/Windows/Debugger/CtrlRegisterList.cpp b/Windows/Debugger/CtrlRegisterList.cpp index 6f76773646..6a9241be81 100644 --- a/Windows/Debugger/CtrlRegisterList.cpp +++ b/Windows/Debugger/CtrlRegisterList.cpp @@ -13,7 +13,6 @@ #include "Debugger_MemoryDlg.h" #include "Core/Config.h" -#include "../../globals.h" #include "Debugger_Disasm.h" #include "DebuggerShared.h" diff --git a/Windows/Debugger/Debugger_Disasm.h b/Windows/Debugger/Debugger_Disasm.h index 25a086660d..5639b6e409 100644 --- a/Windows/Debugger/Debugger_Disasm.h +++ b/Windows/Debugger/Debugger_Disasm.h @@ -7,7 +7,6 @@ #include "Windows/Debugger/CtrlDisasmView.h" #include "Windows/Debugger/Debugger_Lists.h" #include "Windows/Debugger/CPURegsInterface.h" -#include "Globals.h" #include "Core/MIPS/MIPSDebugInterface.h" #include "Core/Debugger/Breakpoints.h" #include diff --git a/Windows/EmuThread.cpp b/Windows/EmuThread.cpp index 6ff1511caa..28626ae301 100644 --- a/Windows/EmuThread.cpp +++ b/Windows/EmuThread.cpp @@ -8,7 +8,6 @@ #include "Common/Log.h" #include "Common/StringUtils.h" -#include "Globals.h" #include "Windows/EmuThread.h" #include "Windows/W32Util/Misc.h" #include "Windows/MainWindow.h" diff --git a/Windows/GEDebugger/CtrlDisplayListView.h b/Windows/GEDebugger/CtrlDisplayListView.h index 5f9748fb4a..319d54ec20 100644 --- a/Windows/GEDebugger/CtrlDisplayListView.h +++ b/Windows/GEDebugger/CtrlDisplayListView.h @@ -1,7 +1,6 @@ #pragma once #include "Common/CommonWindows.h" -#include "Globals.h" #include "GPU/Common/GPUDebugInterface.h" #include diff --git a/Windows/GEDebugger/GEDebugger.h b/Windows/GEDebugger/GEDebugger.h index ae71c929f7..10ca029945 100644 --- a/Windows/GEDebugger/GEDebugger.h +++ b/Windows/GEDebugger/GEDebugger.h @@ -19,7 +19,6 @@ #include "Common/CommonWindows.h" #include "GPU/Common/GPUDebugInterface.h" -#include "Globals.h" #include "Windows/resource.h" #include "Windows/W32Util/DialogManager.h" #include "Windows/W32Util/TabControl.h" diff --git a/Windows/GEDebugger/SimpleGLWindow.h b/Windows/GEDebugger/SimpleGLWindow.h index 64b8c06bb0..efd5763d80 100644 --- a/Windows/GEDebugger/SimpleGLWindow.h +++ b/Windows/GEDebugger/SimpleGLWindow.h @@ -22,7 +22,6 @@ #include "gfx_es2/glsl_program.h" #include "Common/CommonWindows.h" -#include "Globals.h" struct SimpleGLWindow { static const wchar_t *windowClass; diff --git a/Windows/GEDebugger/TabDisplayLists.h b/Windows/GEDebugger/TabDisplayLists.h index 9909d04e1f..ff4388225a 100644 --- a/Windows/GEDebugger/TabDisplayLists.h +++ b/Windows/GEDebugger/TabDisplayLists.h @@ -1,7 +1,6 @@ #pragma once #include "Common/CommonWindows.h" -#include "Globals.h" #include "Windows/resource.h" #include "Windows/W32Util/DialogManager.h" #include "Windows/W32Util/Misc.h" diff --git a/Windows/Globals.cpp b/Windows/Globals.cpp deleted file mode 100644 index 60d438b226..0000000000 --- a/Windows/Globals.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012- PPSSPP 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 or later versions. - -// 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 git repository and contact information can be found at -// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. - - -#include "Globals.h" -#include "MsgHandler.h" - -#ifdef _WIN32 -#include "Common/CommonWindows.h" - -// Globals -HMENU g_hPopupMenus; -int g_activeWindow = 0; -#endif - diff --git a/Windows/InputBox.cpp b/Windows/InputBox.cpp index bb840adb8d..f3aebb8582 100644 --- a/Windows/InputBox.cpp +++ b/Windows/InputBox.cpp @@ -1,3 +1,4 @@ +#include "Common/CommonTypes.h" #include "Common/CommonWindows.h" #include "Windows/InputBox.h" #include "Windows/resource.h" diff --git a/Windows/InputBox.h b/Windows/InputBox.h index fdfc1ebd6b..19feafab28 100644 --- a/Windows/InputBox.h +++ b/Windows/InputBox.h @@ -1,7 +1,5 @@ #pragma once -#include "Globals.h" - #include "Common/CommonWindows.h" diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index 054c63bc1e..ba507b916f 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -33,8 +33,6 @@ #include "base/display.h" #include "base/NativeApp.h" -#include "Globals.h" - #include "base/timeutil.h" #include "i18n/i18n.h" #include "input/input_state.h" diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj index 82eea45ea8..ea471b88fb 100644 --- a/Windows/PPSSPP.vcxproj +++ b/Windows/PPSSPP.vcxproj @@ -425,7 +425,6 @@ - Create @@ -500,7 +499,6 @@ - diff --git a/Windows/PPSSPP.vcxproj.filters b/Windows/PPSSPP.vcxproj.filters index f745a6822b..7aa93096ef 100644 --- a/Windows/PPSSPP.vcxproj.filters +++ b/Windows/PPSSPP.vcxproj.filters @@ -88,7 +88,6 @@ Windows\Input - @@ -239,7 +238,6 @@ Windows\System - diff --git a/Windows/main.cpp b/Windows/main.cpp index f84bb6604a..3be01d8354 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -80,6 +80,9 @@ static std::string langRegion; static std::string osName; static std::string gpuDriverVersion; +HMENU g_hPopupMenus; +int g_activeWindow = 0; + void LaunchBrowser(const char *url) { ShellExecute(NULL, L"open", ConvertUTF8ToWString(url).c_str(), NULL, NULL, SW_SHOWNORMAL); } diff --git a/ext/native/base/basictypes.h b/ext/native/base/basictypes.h index de6d86e3f7..48fb002a7c 100644 --- a/ext/native/base/basictypes.h +++ b/ext/native/base/basictypes.h @@ -1,17 +1,18 @@ #pragma once -#include -#include // for byte swapping +#include +#include // for byte swapping #ifdef _WIN32 #pragma warning(disable:4244) #pragma warning(disable:4996) #endif +#ifndef DISALLOW_COPY_AND_ASSIGN #define DISALLOW_COPY_AND_ASSIGN(t) \ -private: \ - t(const t &other); \ - void operator =(const t &other); + t(const t &other) = delete; \ + void operator =(const t &other) = delete; +#endif #ifdef _WIN32 @@ -19,20 +20,6 @@ typedef intptr_t ssize_t; #include -#define ALIGNED16(x) __declspec(align(16)) x -#define ALIGNED32(x) __declspec(align(32)) x -#define ALIGNED64(x) __declspec(align(64)) x -#define ALIGNED16_DECL(x) __declspec(align(16)) x -#define ALIGNED64_DECL(x) __declspec(align(64)) x - -#else - -#define ALIGNED16(x) __attribute__((aligned(16))) x -#define ALIGNED32(x) __attribute__((aligned(32))) x -#define ALIGNED64(x) __attribute__((aligned(64))) x -#define ALIGNED16_DECL(x) __attribute__((aligned(16))) x -#define ALIGNED64_DECL(x) __attribute__((aligned(64))) x - #endif // _WIN32 // Byteswapping diff --git a/headless/Compare.h b/headless/Compare.h index 4e054ce416..3c4ddf96f7 100644 --- a/headless/Compare.h +++ b/headless/Compare.h @@ -18,7 +18,7 @@ #include #include -#include "Globals.h" +#include "Common/CommonTypes.h" struct GPUDebugBuffer; From 7bb427e6f16962034f6b86be64a03bc667294ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 31 Aug 2017 17:24:34 +0200 Subject: [PATCH 3/4] Buildfix --- GPU/Math3D.h | 1 + 1 file changed, 1 insertion(+) diff --git a/GPU/Math3D.h b/GPU/Math3D.h index 1a6f75d7d3..081701da6f 100644 --- a/GPU/Math3D.h +++ b/GPU/Math3D.h @@ -20,6 +20,7 @@ #include #include "Common/Common.h" +#include "Core/Util/AudioFormat.h" // for clamp_u8 #include "math/fast/fast_matrix.h" #if defined(_M_SSE) From d81cbd6969484a810b9d92fca8871b51fb8a5a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 31 Aug 2017 17:58:31 +0200 Subject: [PATCH 4/4] Linux buildfix --- Core/HW/SasReverb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/HW/SasReverb.cpp b/Core/HW/SasReverb.cpp index 5b38ff23e3..7dfb429f8b 100644 --- a/Core/HW/SasReverb.cpp +++ b/Core/HW/SasReverb.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 +#include +#include #include "base/basictypes.h" #include "Core/HW/SasReverb.h"