Permalink
Browse files

Core: Move config enums to separate file.

These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
  • Loading branch information...
unknownbrackets committed Jun 17, 2018
1 parent dc840c0 commit b4496f197548c30766b2106d7ad4f062293360e9
Showing with 129 additions and 49 deletions.
  1. +1 −0 CMakeLists.txt
  2. +5 −0 Core/Config.cpp
  3. +1 −49 Core/Config.h
  4. +67 −0 Core/ConfigValues.h
  5. +1 −0 Core/Core.vcxproj
  6. +3 −0 Core/Core.vcxproj.filters
  7. +1 −0 Core/HLE/sceIo.cpp
  8. +1 −0 Core/HW/StereoResampler.cpp
  9. +1 −0 Core/MIPS/MIPS.cpp
  10. +1 −0 Core/MemMap.cpp
  11. +1 −0 Core/MemMapFunctions.cpp
  12. +1 −0 Core/PSPLoaders.cpp
  13. +1 −0 GPU/Common/FramebufferCommon.cpp
  14. +1 −0 GPU/Common/GPUStateUtils.cpp
  15. +1 −0 GPU/Common/VertexDecoderCommon.cpp
  16. +1 −0 GPU/D3D11/FramebufferManagerD3D11.cpp
  17. +1 −0 GPU/Directx9/FramebufferDX9.cpp
  18. +1 −0 GPU/Directx9/GPU_DX9.cpp
  19. +1 −0 GPU/GLES/FramebufferManagerGLES.cpp
  20. +2 −0 GPU/GLES/StencilBufferGLES.cpp
  21. +1 −0 GPU/Software/SoftGpu.cpp
  22. +1 −0 GPU/Vulkan/FramebufferVulkan.cpp
  23. +2 −0 Qt/QtMain.cpp
  24. +1 −0 Qt/QtMain.h
  25. +1 −0 SDL/SDLGLGraphicsContext.cpp
  26. +1 −0 SDL/SDLMain.cpp
  27. +1 −0 SDL/SDLVulkanGraphicsContext.cpp
  28. +1 −0 UI/DevScreens.cpp
  29. +1 −0 UI/DisplayLayoutScreen.cpp
  30. +1 −0 UI/EmuScreen.cpp
  31. +1 −0 UI/GameSettingsScreen.cpp
  32. +1 −0 UI/NativeApp.cpp
  33. +1 −0 Windows/DSoundStream.cpp
  34. +1 −0 Windows/DSoundStream.h
  35. +1 −0 Windows/EmuThread.cpp
  36. +1 −0 Windows/GPU/D3D11Context.cpp
  37. +1 −0 Windows/GPU/D3D9Context.cpp
  38. +1 −0 Windows/GPU/WindowsGLContext.cpp
  39. +1 −0 Windows/GPU/WindowsVulkanContext.cpp
  40. +1 −0 Windows/MainWindow.cpp
  41. +1 −0 Windows/MainWindowMenu.cpp
  42. +1 −0 Windows/WindowsHost.cpp
  43. +1 −0 Windows/main.cpp
  44. +1 −0 android/jni/AndroidEGLContext.cpp
  45. +1 −0 android/jni/AndroidJavaGLContext.cpp
  46. +1 −0 android/jni/AndroidVulkanContext.cpp
  47. +1 −0 android/jni/app-android.cpp
  48. +1 −0 headless/Headless.cpp
  49. +1 −0 headless/SDLHeadlessHost.cpp
  50. +1 −0 ios/ViewController.mm
  51. +1 −0 libretro/LibretroGLContext.cpp
  52. +1 −0 libretro/LibretroVulkanContext.cpp
  53. +1 −0 libretro/libretro.cpp
  54. +1 −0 unittest/JitHarness.cpp
  55. +1 −0 unittest/TestVertexJit.cpp
@@ -1381,6 +1381,7 @@ add_library(${CoreLibName} ${CoreLinkType}
${CoreExtra}
Core/Config.cpp
Core/Config.h
Core/ConfigValues.h
Core/Core.cpp
Core/Core.h
Core/Compatibility.cpp
@@ -38,6 +38,7 @@
#include "Common/StringUtils.h"
#include "Common/Vulkan/VulkanLoader.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Loaders.h"
#include "Core/HLE/sceUtility.h"
#include "GPU/Common/FramebufferCommon.h"
@@ -1481,3 +1482,7 @@ void Config::GetReportingInfo(UrlEncoder &data) {
}
}
}
bool Config::IsPortrait() const {
return (iInternalScreenRotation == ROTATION_LOCKED_VERTICAL || iInternalScreenRotation == ROTATION_LOCKED_VERTICAL180) && iRenderingMode != 0;
}
@@ -25,52 +25,6 @@
extern const char *PPSSPP_GIT_VERSION;
const int PSP_MODEL_FAT = 0;
const int PSP_MODEL_SLIM = 1;
const int PSP_DEFAULT_FIRMWARE = 660;
static const s8 VOLUME_OFF = 0;
static const s8 VOLUME_MAX = 10;
enum class CPUCore {
INTERPRETER = 0,
JIT = 1,
IR_JIT = 2,
};
enum {
ROTATION_AUTO = 0,
ROTATION_LOCKED_HORIZONTAL = 1,
ROTATION_LOCKED_VERTICAL = 2,
ROTATION_LOCKED_HORIZONTAL180 = 3,
ROTATION_LOCKED_VERTICAL180 = 4,
};
enum BufferFilter {
SCALE_LINEAR = 1,
SCALE_NEAREST = 2,
};
// Software is not among these because it will have one of these perform the blit to display.
enum class GPUBackend {
OPENGL = 0,
DIRECT3D9 = 1,
DIRECT3D11 = 2,
VULKAN = 3,
};
enum AudioBackendType {
AUDIO_BACKEND_AUTO,
AUDIO_BACKEND_DSOUND,
AUDIO_BACKEND_WASAPI,
};
// For iIOTimingMethod.
enum IOTimingMethods {
IOTIMING_FAST = 0,
IOTIMING_HOST = 1,
IOTIMING_REALISTIC = 2,
};
namespace http {
class Download;
class Downloader;
@@ -510,9 +464,7 @@ struct Config {
void GetReportingInfo(UrlEncoder &data);
bool IsPortrait() const {
return (iInternalScreenRotation == ROTATION_LOCKED_VERTICAL || iInternalScreenRotation == ROTATION_LOCKED_VERTICAL180) && iRenderingMode != 0;
}
bool IsPortrait() const;
protected:
void LoadStandardControllerIni();
@@ -0,0 +1,67 @@
// 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 <cstdint>
const int PSP_MODEL_FAT = 0;
const int PSP_MODEL_SLIM = 1;
const int PSP_DEFAULT_FIRMWARE = 660;
static const int8_t VOLUME_OFF = 0;
static const int8_t VOLUME_MAX = 10;
enum class CPUCore {
INTERPRETER = 0,
JIT = 1,
IR_JIT = 2,
};
enum {
ROTATION_AUTO = 0,
ROTATION_LOCKED_HORIZONTAL = 1,
ROTATION_LOCKED_VERTICAL = 2,
ROTATION_LOCKED_HORIZONTAL180 = 3,
ROTATION_LOCKED_VERTICAL180 = 4,
};
enum BufferFilter {
SCALE_LINEAR = 1,
SCALE_NEAREST = 2,
};
// Software is not among these because it will have one of these perform the blit to display.
enum class GPUBackend {
OPENGL = 0,
DIRECT3D9 = 1,
DIRECT3D11 = 2,
VULKAN = 3,
};
enum AudioBackendType {
AUDIO_BACKEND_AUTO,
AUDIO_BACKEND_DSOUND,
AUDIO_BACKEND_WASAPI,
};
// For iIOTimingMethod.
enum IOTimingMethods {
IOTIMING_FAST = 0,
IOTIMING_HOST = 1,
IOTIMING_REALISTIC = 2,
};
@@ -544,6 +544,7 @@
<ClInclude Include="..\ext\udis86\udint.h" />
<ClInclude Include="..\ext\udis86\udis86.h" />
<ClInclude Include="AVIDump.h" />
<ClInclude Include="ConfigValues.h" />
<ClInclude Include="Debugger\WebSocket.h" />
<ClInclude Include="Debugger\WebSocket\BreakpointSubscriber.h" />
<ClInclude Include="Debugger\WebSocket\GameSubscriber.h" />
@@ -1352,6 +1352,9 @@
<ClInclude Include="Debugger\WebSocket\GPUBufferSubscriber.h">
<Filter>Debugger\WebSocket</Filter>
</ClInclude>
<ClInclude Include="ConfigValues.h">
<Filter>Core</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />
@@ -24,6 +24,7 @@
#include "Core/Core.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Debugger/Breakpoints.h"
#include "Core/ELF/ParamSFO.h"
#include "Core/MemMapHelpers.h"
@@ -37,6 +37,7 @@
#include "Common/MathUtil.h"
#include "Common/Atomics.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/HW/StereoResampler.h"
#include "Core/HLE/__sceAudio.h"
#include "Core/Util/AudioFormat.h" // for clamp_u8
@@ -22,6 +22,7 @@
#include "Common.h"
#include "Common/ChunkFile.h"
#include "Core/ConfigValues.h"
#include "Core/MIPS/MIPS.h"
#include "Core/MIPS/MIPSInt.h"
#include "Core/MIPS/MIPSTables.h"
@@ -38,6 +38,7 @@
#include "Core/Debugger/SymbolMap.h"
#include "Core/Debugger/Breakpoints.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/HLE/ReplaceTables.h"
#include "Core/MIPS/JitCommon/JitBlockCache.h"
@@ -21,6 +21,7 @@
#include "Core/Core.h"
#include "Core/MemMap.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Host.h"
#include "Core/Reporting.h"
@@ -48,6 +48,7 @@
#include "Host.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "Core/PSPLoaders.h"
#include "Core/HLE/HLE.h"
@@ -28,6 +28,7 @@
#include "Common/ColorConv.h"
#include "Common/Common.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/CoreParameter.h"
#include "Core/Host.h"
#include "Core/Reporting.h"
@@ -22,6 +22,7 @@
#include "Common/StringUtils.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "GPU/ge_constants.h"
@@ -24,6 +24,7 @@
#include "Common/CPUDetect.h"
#include "Common/ColorConv.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/MemMap.h"
#include "Core/HDRemaster.h"
#include "Core/Reporting.h"
@@ -31,6 +31,7 @@
#include "Core/Host.h"
#include "Core/MemMap.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "Core/Reporting.h"
#include "GPU/ge_constants.h"
@@ -22,6 +22,7 @@
#include "Core/Host.h"
#include "Core/MemMap.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "Core/Reporting.h"
#include "GPU/ge_constants.h"
@@ -28,6 +28,7 @@
#include "Core/MIPS/MIPS.h"
#include "Core/Host.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Reporting.h"
#include "Core/System.h"
@@ -32,6 +32,7 @@
#include "Core/Host.h"
#include "Core/MemMap.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "Core/Reporting.h"
#include "GPU/ge_constants.h"
@@ -16,6 +16,8 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "gfx_es2/glsl_program.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Reporting.h"
#include "GPU/Common/StencilCommon.h"
#include "GPU/GLES/FramebufferManagerGLES.h"
@@ -21,6 +21,7 @@
#include "Common/ColorConv.h"
#include "Common/GraphicsContext.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Debugger/Breakpoints.h"
#include "Core/Host.h"
#include "Core/MemMap.h"
@@ -35,6 +35,7 @@
#include "Core/Host.h"
#include "Core/MemMap.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "Core/Reporting.h"
#include "Core/HLE/sceDisplay.h"
@@ -31,6 +31,8 @@
#include "gfx_es2/gpu_features.h"
#include "math/math_util.h"
#include "thread/threadutil.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include <string.h>
@@ -38,6 +38,7 @@ QTM_USE_NAMESPACE
#include "Common/GraphicsContext.h"
#include "Core/Core.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "thin3d/thin3d_create.h"
#include "thin3d/GLRenderManager.h"
@@ -1,6 +1,7 @@
#include <vector>
#include "SDLGLGraphicsContext.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "base/NativeApp.h"
#include "base/display.h"
@@ -51,6 +51,7 @@ SDLJoystick *joystick = NULL;
#include "Core/System.h"
#include "Core/Core.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Common/GraphicsContext.h"
#include "SDLGLGraphicsContext.h"
#include "SDLVulkanGraphicsContext.h"
@@ -1,4 +1,5 @@
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "base/NativeApp.h"
#include "base/display.h"
#include "thin3d/thin3d.h"
@@ -30,6 +30,7 @@
#include "Core/MemMap.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "Core/CoreParameter.h"
#include "Core/MIPS/MIPSTables.h"
@@ -26,6 +26,7 @@
#include "DisplayLayoutScreen.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/System.h"
#include "DisplayLayoutEditor.h"
#include "GPU/Common/FramebufferCommon.h"
@@ -41,6 +41,7 @@
#include "Core/AVIDump.h"
#endif
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/CoreTiming.h"
#include "Core/CoreParameter.h"
#include "Core/Core.h"
@@ -49,6 +49,7 @@
#include "Common/FileUtil.h"
#include "Common/OSVersion.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Host.h"
#include "Core/System.h"
#include "Core/Reporting.h"
@@ -71,6 +71,7 @@
#include "Common/MemArena.h"
#include "Common/GraphicsContext.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
#include "Core/Core.h"
#include "Core/FileLoaders/DiskCachingFileLoader.h"
#include "Core/Host.h"
@@ -12,6 +12,7 @@
#include "thread/threadutil.h"
#include "Common/OSVersion.h"
#include "Core/ConfigValues.h"
#include "Core/Reporting.h"
#include "Core/Util/AudioFormat.h"
#include "Windows/W32Util/Misc.h"
@@ -2,6 +2,7 @@
#include "Common/CommonWindows.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
typedef int (*StreamCallback)(short *buffer, int numSamples, int bits, int rate, int channels);
Oops, something went wrong.

0 comments on commit b4496f1

Please sign in to comment.