mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
Fixed clang and added a const keyword for mac
This commit is contained in:
parent
e38e75b27b
commit
3e512bcd51
@ -801,7 +801,7 @@ std::filesystem::path getFoolproofKbmConfigFile(const std::string& game_id) {
|
||||
}
|
||||
|
||||
// if empty, we only need to execute the function up until this point
|
||||
if(game_id.empty()) {
|
||||
if (game_id.empty()) {
|
||||
return default_config_file;
|
||||
}
|
||||
|
||||
|
@ -343,13 +343,13 @@ void ControllerOutput::update(bool pressed, u32 param) {
|
||||
case Axis::TriggerRight:
|
||||
// todo: verify this works (This probably works from testing,
|
||||
// but needs extra info (multiple input to the same trigger?))
|
||||
axis_value = SDL_clamp((pressed ? (int)param : 0) * multiplier, 0, 127);
|
||||
axis_value = SDL_clamp((pressed ? (s32)param : 0) * multiplier, 0, 127);
|
||||
controller->Axis(0, axis, GetAxis(0, 0x80, axis_value));
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
axis_value = SDL_clamp((pressed ? (int)param : 0) * multiplier, -127, 127);
|
||||
axis_value = SDL_clamp((pressed ? (s32)param : 0) * multiplier, -127, 127);
|
||||
int ax = GetAxis(-0x80, 0x80, axis_value);
|
||||
controller->Axis(0, axis, ax);
|
||||
} else {
|
||||
@ -400,13 +400,13 @@ void ControllerOutput::addUpdate(bool pressed, u32 param) {
|
||||
case Axis::TriggerLeft:
|
||||
case Axis::TriggerRight:
|
||||
// todo: verify this works
|
||||
axis_value = SDL_clamp((pressed ? (int)param : 0) * multiplier + axis_value, 0, 127);
|
||||
axis_value = SDL_clamp((pressed ? (s32)param : 0) * multiplier + axis_value, 0, 127);
|
||||
controller->Axis(0, axis, GetAxis(0, 0x80, axis_value));
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
axis_value = SDL_clamp((pressed ? (int)param : 0) * multiplier + axis_value, -127, 127);
|
||||
axis_value = SDL_clamp((pressed ? (s32)param : 0) * multiplier + axis_value, -127, 127);
|
||||
controller->Axis(0, axis, GetAxis(-0x80, 0x80, axis_value));
|
||||
// LOG_INFO(Input, "Axis value delta: {} final value: {}", (pressed ? a_value : 0),
|
||||
// axis_value);
|
||||
|
@ -299,7 +299,7 @@ public:
|
||||
// todo: check if out is in the allowed array
|
||||
output = out;
|
||||
}
|
||||
bool operator<(const BindingConnection& other) {
|
||||
bool operator<(const BindingConnection& other) const {
|
||||
return binding < other.binding;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user