Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request hrydgard#17214 from unknownbrackets/softgpu-alpha #6

Merged
merged 28 commits into from
Apr 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
26bf40c
ControlMapper: Change the callbacks to be more suitable for the upcom…
hrydgard Mar 30, 2023
2814668
Show a MIPS stack trace on crash screen (#17211)
hrydgard Mar 31, 2023
38f4cc4
Make reverse mapping lookup work for the simple PSP buttons.
hrydgard Mar 29, 2023
8dabcae
Enable virtual key mappings in UpdatePSPState
hrydgard Mar 29, 2023
526b4f7
Fixes, add callback for analog virtual keys
hrydgard Mar 29, 2023
7dfa587
Remove in/out function arguments
hrydgard Mar 30, 2023
ca300a4
More callback fixes
hrydgard Mar 30, 2023
fa0fb6e
Rework and simplify VIRTKEY_SPEED_ANALOG
hrydgard Mar 30, 2023
88e8965
Bring back zeroing of the opposite direction.
hrydgard Mar 30, 2023
ea60ff2
Add missing locking to control mapper
hrydgard Mar 30, 2023
778d9ac
Handle mapping signed axis to our only unsigned input, VIRTKEY_SPEED_…
hrydgard Mar 30, 2023
025ec24
Don't need two SetCallback functions.
hrydgard Mar 31, 2023
48993f4
Control: Add debug display, do assorted fixes.
hrydgard Mar 31, 2023
9804a90
More tweaks (work around the old problem where lingering analog value…
hrydgard Mar 31, 2023
2428051
buildfix
hrydgard Mar 31, 2023
1f776b4
Update pspautotests submodule
hrydgard Mar 31, 2023
5332850
More accurate check for LoadCLUT from framebuffer margins.
hrydgard Mar 31, 2023
1144818
Merge pull request #17212 from hrydgard/load-clut-more-accurate-margi…
unknownbrackets Apr 1, 2023
839bc1f
headless: Fix screenshot failure.
unknownbrackets Apr 1, 2023
2c5b099
softgpu: Make debug-only optim more consistent.
unknownbrackets Apr 1, 2023
a88b8a1
softgpu: Fix over-optimization of alpha test.
unknownbrackets Apr 1, 2023
04d3d31
Clean up __Ctrl button functions.
hrydgard Apr 1, 2023
0432128
Remove redundant callback
hrydgard Apr 1, 2023
0b57461
Address assorted feedback
hrydgard Apr 1, 2023
f3012f6
Break out the signed->unsigned axis mapping
hrydgard Apr 1, 2023
335df0f
libretro buildfix
hrydgard Apr 1, 2023
a6bf499
Merge pull request #17210 from hrydgard/control-mapping-refactor
unknownbrackets Apr 1, 2023
81608b0
Merge pull request #17214 from unknownbrackets/softgpu-alpha
hrydgard Apr 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Common/Input/InputState.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <vector>
#include <cstdio>

#include "Common/Input/InputState.h"
#include "Common/Input/KeyCodes.h"
#include <vector>

const char *GetDeviceName(int deviceId) {
switch (deviceId) {
Expand Down Expand Up @@ -76,3 +78,13 @@ int GetAnalogYDirection(int deviceId) {
return configured->second;
return 0;
}

void InputMapping::FormatDebug(char *buffer, size_t bufSize) const {
if (IsAxis()) {
int direction;
int axis = Axis(&direction);
snprintf(buffer, bufSize, "Device: %d Axis: %d (%d)", deviceId, axis, direction);
} else {
snprintf(buffer, bufSize, "Device: %d Key: %d", deviceId, keyCode);
}
}
10 changes: 9 additions & 1 deletion Common/Input/InputState.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ class InputMapping {
return TranslateKeyCodeToAxis(keyCode, direction);
}

InputMapping FlipDirection() const {
_dbg_assert_(IsAxis());
InputMapping other = *this;
other.keyCode ^= 1;
return other;
}

// If you want to use std::find and match ANY, you need to perform an explicit search for that.
bool operator < (const InputMapping &other) const {
if (deviceId < other.deviceId) return true;
Expand All @@ -129,6 +136,8 @@ class InputMapping {
if (keyCode != other.keyCode) return false;
return true;
}

void FormatDebug(char *buffer, size_t bufSize) const;
};

enum {
Expand Down Expand Up @@ -183,7 +192,6 @@ struct AxisInput {
int deviceId;
int axisId; // Android axis Ids are the canonical ones.
float value;
int flags;
};

// Is there a nicer place for this stuff? It's here to avoid dozens of linking errors in UnitTest..
Expand Down
3 changes: 3 additions & 0 deletions Common/VR/PPSSPPVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#include "Common/VR/VRMath.h"
#include "Common/VR/VRRenderer.h"

#include "Common/Input/InputState.h"
#include "Common/Input/KeyCodes.h"

#include "Common/GPU/Vulkan/VulkanContext.h"

#include "Common/Math/lin/matrix4x4.h"
Expand Down
1 change: 0 additions & 1 deletion Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,6 @@ static const ConfigSetting graphicsSettings[] = {
ConfigSetting("FrameRate", &g_Config.iFpsLimit1, 0, true, true),
ConfigSetting("FrameRate2", &g_Config.iFpsLimit2, -1, true, true),
ConfigSetting("AnalogFrameRate", &g_Config.iAnalogFpsLimit, 240, true, true),
ConfigSetting("AnalogFrameRateMode", &g_Config.iAnalogFpsMode, 0, true, true),
ConfigSetting("UnthrottlingMode", &g_Config.iFastForwardMode, &DefaultFastForwardMode, &FastForwardModeToString, &FastForwardModeFromString, true, true),
#if defined(USING_WIN_UI)
ConfigSetting("RestartRequired", &g_Config.bRestartRequired, false, false),
Expand Down
3 changes: 2 additions & 1 deletion Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ struct Config {
int iFpsLimit1;
int iFpsLimit2;
int iAnalogFpsLimit;
int iAnalogFpsMode; // 0 = auto, 1 = single direction, 2 = mapped to opposite
int iMaxRecent;
int iCurrentStateSlot;
int iRewindSnapshotInterval;
Expand Down Expand Up @@ -277,9 +276,11 @@ struct Config {

std::string sThemeName;

// These aren't saved, just for instant debugging.
bool bLogFrameDrops;
bool bShowDebugStats;
bool bShowAudioDebug;
bool bShowControlDebug;
bool bShowGpuProfile;

// Analog stick tilting
Expand Down
6 changes: 0 additions & 6 deletions Core/ConfigValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ enum class BackgroundAnimation {
MOVING_BACKGROUND = 4,
};

enum class AnalogFpsMode {
AUTO = 0,
MAPPED_DIRECTION = 1,
MAPPED_DIR_TO_OPPOSITE_DIR = 2,
};

// for Config.iShowStatusFlags
enum class ShowStatusFlags {
FPS_COUNTER = 1 << 1,
Expand Down
Loading