mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-23 01:42:19 -05:00
Fix issue with 'auto' controller setting (#1548)
* Fix issue with 'auto' controller setting * Combine inputs rather than overwrite for auto setting * Swap condition checking for zeroed pads
This commit is contained in:
parent
3d0d97d6b5
commit
ec2222347e
@ -79,7 +79,14 @@ namespace Ship {
|
||||
|
||||
padBuffer.push_front(padToBuffer);
|
||||
if (pad != nullptr) {
|
||||
*pad = padBuffer[std::min(padBuffer.size() - 1, (size_t)CVar_GetS32("gSimulatedInputLag", 0))];
|
||||
auto &padFromBuffer = padBuffer[std::min(padBuffer.size() - 1, (size_t)CVar_GetS32("gSimulatedInputLag", 0))];
|
||||
pad->button |= padFromBuffer.button;
|
||||
if (pad->stick_x == 0) pad->stick_x = padFromBuffer.stick_x;
|
||||
if (pad->stick_y == 0) pad->stick_y = padFromBuffer.stick_y;
|
||||
if (pad->gyro_x == 0) pad->gyro_x = padFromBuffer.gyro_x;
|
||||
if (pad->gyro_y == 0) pad->gyro_y = padFromBuffer.gyro_y;
|
||||
if (pad->right_stick_x == 0) pad->right_stick_x = padFromBuffer.right_stick_x;
|
||||
if (pad->right_stick_y == 0) pad->right_stick_y = padFromBuffer.right_stick_y;
|
||||
}
|
||||
|
||||
while (padBuffer.size() > 6) {
|
||||
|
Loading…
Reference in New Issue
Block a user