Skip to content

Commit

Permalink
Unbreak things
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Mar 30, 2023
1 parent 326dfbb commit 3558139
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Core/ControlMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,17 @@ bool ControlMapper::UpdatePSPState(const InputMapping &changedMapping) {

value = clamp_value(value, 0.0f, 1.0f);

// Derive bools from the floats using the device's threshold.
// NOTE: This must be before the equality check below.
bool bPrevValue = virtKeys_[i] >= threshold;
bool bValue = value >= threshold;

if (virtKeys_[i] != value) {
// INFO_LOG(G3D, "vkeyanalog %s : %f", KeyMap::GetVirtKeyName(vkId), value);
onVKeyAnalog(changedMapping.deviceId, vkId, value);
virtKeys_[i] = value;
}

// Derive bools from the floats using the device's threshold.
bool bPrevValue = virtKeys_[i] >= threshold;
bool bValue = value >= threshold;
if (zeroOpposite) {
// For analog stick events, always zero the "opposite" when we get a valid value.
// Otherwise, lingering small values can create strange offsets when summing up later.
Expand Down
2 changes: 1 addition & 1 deletion ext/glslang
Submodule glslang updated 109 files

0 comments on commit 3558139

Please sign in to comment.