mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-30 03:28:55 -07:00
Rumble cvar and fixes (#184)
* Rumble indefinitely until turned off * Add rumble cvar * Register CVar * Check if controller can rumble to insert rumble pak * Reduce verbosity of checks * Remove extraneous const_cast * Once again remove extraneous const_cast * Add per-controller settings * Add nice spacing * Only display controller entry if pad connected * Const some stuff
This commit is contained in:
parent
486f673df5
commit
eea5135d62
14 changed files with 274 additions and 150 deletions
|
@ -269,7 +269,7 @@ void PadMgr_ProcessInputs(PadMgr* padMgr) {
|
|||
input->press.stick_y += (s8)(input->cur.stick_y - input->prev.stick_y);
|
||||
}
|
||||
|
||||
controllerCallback.rumble = padMgr->rumbleEnable[0] > 0 ? 1 : 0;
|
||||
controllerCallback.rumble = CVar_GetS32("gRumbleEnabled", 0) && (padMgr->rumbleEnable[0] > 0);
|
||||
|
||||
if (HealthMeter_IsCritical()) {
|
||||
controllerCallback.ledColor = 0;
|
||||
|
@ -303,6 +303,11 @@ void PadMgr_HandleRetraceMsg(PadMgr* padMgr) {
|
|||
}
|
||||
osRecvMesg(queue, NULL, OS_MESG_BLOCK);
|
||||
osContGetReadData(padMgr->pads);
|
||||
|
||||
for (i = 0; i < __osMaxControllers; i++) {
|
||||
padMgr->padStatus[i].status = CVar_GetS32("gRumbleEnabled", 0) && Controller_ShouldRumble(i);
|
||||
}
|
||||
|
||||
if (padMgr->preNMIShutdown) {
|
||||
memset(padMgr->pads, 0, sizeof(padMgr->pads));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue