Permalink
Browse files

Merge pull request #11187 from unknownbrackets/alt-speed

Add second alternate speed and buttons for alt speed
  • Loading branch information...
hrydgard committed Jun 24, 2018
2 parents 1b97821 + 0564e9e commit 4cfc6ee2723477846bd9ea97d552a3a0feb04d9b
Showing with 699 additions and 636 deletions.
  1. +1 −0 CMakeLists.txt
  2. +2 −0 Common/KeyMap.cpp
  3. +2 −0 Common/KeyMap.h
  4. +96 −131 Core/Config.cpp
  5. +28 −103 Core/Config.h
  6. +73 −0 Core/ConfigValues.h
  7. +1 −0 Core/Core.vcxproj
  8. +3 −0 Core/Core.vcxproj.filters
  9. +16 −10 Core/CoreParameter.h
  10. +21 −14 Core/HLE/sceDisplay.cpp
  11. +1 −0 Core/HLE/sceIo.cpp
  12. +1 −0 Core/HW/StereoResampler.cpp
  13. +1 −0 Core/MIPS/MIPS.cpp
  14. +1 −0 Core/MemMap.cpp
  15. +1 −0 Core/MemMapFunctions.cpp
  16. +1 −0 Core/PSPLoaders.cpp
  17. +6 −5 GPU/Common/FramebufferCommon.cpp
  18. +1 −0 GPU/Common/GPUStateUtils.cpp
  19. +3 −2 GPU/Common/ShaderUniforms.cpp
  20. +1 −0 GPU/Common/VertexDecoderCommon.cpp
  21. +1 −0 GPU/D3D11/FramebufferManagerD3D11.cpp
  22. +1 −0 GPU/Directx9/FramebufferDX9.cpp
  23. +2 −1 GPU/Directx9/GPU_DX9.cpp
  24. +1 −0 GPU/GLES/FramebufferManagerGLES.cpp
  25. +4 −3 GPU/GLES/GPU_GLES.cpp
  26. +2 −0 GPU/GLES/StencilBufferGLES.cpp
  27. +3 −2 GPU/Software/Rasterizer.cpp
  28. +1 −0 GPU/Software/SoftGpu.cpp
  29. +4 −4 GPU/Vulkan/DrawEngineVulkan.cpp
  30. +1 −0 GPU/Vulkan/FramebufferVulkan.cpp
  31. +2 −0 Qt/QtMain.cpp
  32. +1 −0 Qt/QtMain.h
  33. +1 −0 SDL/SDLGLGraphicsContext.cpp
  34. +1 −0 SDL/SDLMain.cpp
  35. +1 −0 SDL/SDLVulkanGraphicsContext.cpp
  36. +1 −0 UI/DevScreens.cpp
  37. +8 −7 UI/DisplayLayoutScreen.cpp
  38. +37 −10 UI/EmuScreen.cpp
  39. +14 −5 UI/GameSettingsScreen.cpp
  40. +2 −1 UI/GameSettingsScreen.h
  41. +154 −217 UI/GamepadEmu.cpp
  42. +23 −5 UI/GamepadEmu.h
  43. +1 −0 UI/NativeApp.cpp
  44. +44 −32 UI/TouchControlLayoutScreen.cpp
  45. +65 −59 UI/TouchControlVisibilityScreen.cpp
  46. +8 −14 UI/TouchControlVisibilityScreen.h
  47. +1 −0 Windows/DSoundStream.cpp
  48. +1 −0 Windows/DSoundStream.h
  49. +1 −0 Windows/EmuThread.cpp
  50. +1 −0 Windows/GPU/D3D11Context.cpp
  51. +1 −0 Windows/GPU/D3D9Context.cpp
  52. +1 −0 Windows/GPU/WindowsGLContext.cpp
  53. +1 −0 Windows/GPU/WindowsVulkanContext.cpp
  54. +1 −0 Windows/MainWindow.cpp
  55. +2 −5 Windows/MainWindowMenu.cpp
  56. +1 −0 Windows/WindowsHost.cpp
  57. +1 −0 Windows/main.cpp
  58. +1 −0 android/jni/AndroidEGLContext.cpp
  59. +1 −0 android/jni/AndroidJavaGLContext.cpp
  60. +1 −0 android/jni/AndroidVulkanContext.cpp
  61. +1 −0 android/jni/app-android.cpp
  62. +17 −3 ext/native/ui/ui_screen.cpp
  63. +13 −2 ext/native/ui/ui_screen.h
  64. +3 −1 headless/Headless.cpp
  65. +1 −0 headless/SDLHeadlessHost.cpp
  66. +1 −0 ios/ViewController.mm
  67. +1 −0 libretro/LibretroGLContext.cpp
  68. +1 −0 libretro/LibretroVulkanContext.cpp
  69. +1 −0 libretro/libretro.cpp
  70. +1 −0 unittest/JitHarness.cpp
  71. +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
@@ -645,6 +645,8 @@ const KeyMap_IntStrPair psp_button_names[] = {
{VIRTKEY_RAPID_FIRE, "RapidFire"},
{VIRTKEY_UNTHROTTLE, "Unthrottle"},
{VIRTKEY_SPEED_TOGGLE, "SpeedToggle"},
{VIRTKEY_SPEED_CUSTOM1, "Alt speed 1"},
{VIRTKEY_SPEED_CUSTOM2, "Alt speed 2"},
{VIRTKEY_PAUSE, "Pause"},
#ifndef MOBILE_DEVICE
{VIRTKEY_FRAME_ADVANCE, "Frame Advance"},
@@ -52,6 +52,8 @@ enum {
VIRTKEY_DEVMENU = 0x40000014,
VIRTKEY_FRAME_ADVANCE = 0x40000015,
VIRTKEY_RECORD = 0x40000016,
VIRTKEY_SPEED_CUSTOM1 = 0x40000017,
VIRTKEY_SPEED_CUSTOM2 = 0x40000018,
VIRTKEY_LAST,
VIRTKEY_COUNT = VIRTKEY_LAST - VIRTKEY_FIRST
};

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -25,59 +25,21 @@
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;
}
struct UrlEncoder;
struct ConfigTouchPos {
float x;
float y;
float scale;
// Note: Show is not used for all settings.
bool show;
};
struct Config {
public:
Config();
@@ -203,10 +165,11 @@ struct Config {
bool bTrueColor;
bool bReplaceTextures;
bool bSaveNewTextures;
int iTexScalingLevel; // 1 = off, 2 = 2x, ..., 5 = 5x
int iTexScalingLevel; // 0 = auto, 1 = off, 2 = 2x, ..., 5 = 5x
int iTexScalingType; // 0 = xBRZ, 1 = Hybrid
bool bTexDeposterize;
int iFpsLimit;
int iFpsLimit1;
int iFpsLimit2;
int iForceMaxEmulatedFPS;
int iMaxRecent;
int iCurrentStateSlot;
@@ -312,46 +275,27 @@ struct Config {
//space between PSP buttons
//the PSP button's center (triangle, circle, square, cross)
float fActionButtonCenterX, fActionButtonCenterY;
float fActionButtonScale;
ConfigTouchPos touchActionButtonCenter;
float fActionButtonSpacing;
//radius of the D-pad (PSP cross)
// int iDpadRadius;
//the D-pad (PSP cross) position
float fDpadX, fDpadY;
float fDpadScale;
ConfigTouchPos touchDpad;
float fDpadSpacing;
//the start key position
float fStartKeyX, fStartKeyY;
float fStartKeyScale;
//the select key position;
float fSelectKeyX, fSelectKeyY;
float fSelectKeyScale;
float fUnthrottleKeyX, fUnthrottleKeyY;
float fUnthrottleKeyScale;
float fLKeyX, fLKeyY;
float fLKeyScale;
float fRKeyX, fRKeyY;
float fRKeyScale;
//position of the analog stick
float fAnalogStickX, fAnalogStickY;
float fAnalogStickScale;
//the Combo Button position
float fcombo0X, fcombo0Y;
float fcomboScale0;
float fcombo1X, fcombo1Y;
float fcomboScale1;
float fcombo2X, fcombo2Y;
float fcomboScale2;
float fcombo3X, fcombo3Y;
float fcomboScale3;
float fcombo4X, fcombo4Y;
float fcomboScale4;
ConfigTouchPos touchStartKey;
ConfigTouchPos touchSelectKey;
ConfigTouchPos touchUnthrottleKey;
ConfigTouchPos touchLKey;
ConfigTouchPos touchRKey;
ConfigTouchPos touchAnalogStick;
ConfigTouchPos touchCombo0;
ConfigTouchPos touchCombo1;
ConfigTouchPos touchCombo2;
ConfigTouchPos touchCombo3;
ConfigTouchPos touchCombo4;
ConfigTouchPos touchSpeed1Key;
ConfigTouchPos touchSpeed2Key;
// Controls Visibility
bool bShowTouchControls;
@@ -361,23 +305,6 @@ struct Config {
bool bShowTouchTriangle;
bool bShowTouchSquare;
bool bShowTouchStart;
bool bShowTouchSelect;
bool bShowTouchUnthrottle;
bool bShowTouchLTrigger;
bool bShowTouchRTrigger;
bool bShowTouchAnalogStick;
bool bShowTouchDpad;
//Combo Button Visibility
bool bShowComboKey0;
bool bShowComboKey1;
bool bShowComboKey2;
bool bShowComboKey3;
bool bShowComboKey4;
// Combo_key mapping. These are bitfields.
int iCombokey0;
int iCombokey1;
@@ -510,9 +437,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,73 @@
// 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,
};
enum class SmallDisplayZoom {
STRETCH = 0,
PARTIAL_STRETCH = 1,
AUTO = 2,
MANUAL = 3,
};
@@ -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" />
@@ -31,6 +31,12 @@ enum GPUCore {
GPUCORE_VULKAN,
};
enum class FPSLimit {
NORMAL = 0,
CUSTOM1 = 1,
CUSTOM2 = 2,
};
class FileLoader;
class GraphicsContext;
@@ -42,13 +48,13 @@ enum class CPUCore;
// PSP_CoreParameter()
struct CoreParameter {
CoreParameter() : thin3d(nullptr), collectEmuLog(0), unthrottle(false), fpsLimit(0), updateRecent(true), freezeNext(false), frozen(false), mountIsoLoader(nullptr) {}
CoreParameter() {}
CPUCore cpuCore;
GPUCore gpuCore;
GraphicsContext *graphicsContext; // TODO: Find a better place.
Draw::DrawContext *thin3d;
GraphicsContext *graphicsContext = nullptr; // TODO: Find a better place.
Draw::DrawContext *thin3d = nullptr;
bool enableSound; // there aren't multiple sound cores.
std::string fileToStart;
@@ -58,7 +64,7 @@ struct CoreParameter {
bool startBreak;
bool printfEmuLog; // writes "emulator:" logging to stdout
std::string *collectEmuLog;
std::string *collectEmuLog = nullptr;
bool headLess; // Try to avoid messageboxes etc
// Internal PSP resolution
@@ -70,16 +76,16 @@ struct CoreParameter {
int pixelHeight;
// Can be modified at runtime.
bool unthrottle;
int fpsLimit;
bool unthrottle = false;
FPSLimit fpsLimit = FPSLimit::NORMAL;
bool updateRecent;
bool updateRecent = true;
// Freeze-frame. For nvidia perfhud profiling. Developers only.
bool freezeNext;
bool frozen;
bool freezeNext = false;
bool frozen = false;
FileLoader *mountIsoLoader;
FileLoader *mountIsoLoader = nullptr;
Compatibility compat;
};
Oops, something went wrong.

0 comments on commit 4cfc6ee

Please sign in to comment.