mirror of
https://github.com/open-goal/jak-project
synced 2026-08-22 07:04:29 -04:00
Fix small buzz motor not vibrating correctly (#2846)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include "common/common_types.h"
|
||||
|
||||
//! Mirror of cpad-info
|
||||
#pragma pack(push, 4)
|
||||
#pragma pack(push, 1)
|
||||
struct CPadInfo {
|
||||
u8 valid;
|
||||
u8 status;
|
||||
@@ -26,13 +26,15 @@ struct CPadInfo {
|
||||
u8 align[6];
|
||||
u8 direct[6];
|
||||
u8 buzz_val[2];
|
||||
u8 buzz_pause_val[1];
|
||||
u8 buzz_pause_time;
|
||||
u64 buzz_time[2];
|
||||
u32 buzz;
|
||||
s32 buzz_act;
|
||||
s32 change_time; // actually u64 in goal!
|
||||
s64 change_time; // actually u64 in goal!
|
||||
};
|
||||
// static_assert(offsetof(CPadInfo, number) == 32, "CPadInfo number field is wrong");
|
||||
static_assert(sizeof(CPadInfo) == 128, "CPadInfo size is wrong");
|
||||
static_assert(sizeof(CPadInfo) == 132, "CPadInfo size is wrong");
|
||||
#pragma pack(pop)
|
||||
|
||||
struct FileStream {
|
||||
|
||||
+2
-1
@@ -98,7 +98,8 @@ int scePadSetActDirect(int port, int /*slot*/, const u8* data) {
|
||||
if (!Display::GetMainDisplay()->get_input_manager()->controller_has_rumble(port)) {
|
||||
return 0;
|
||||
}
|
||||
Display::GetMainDisplay()->get_input_manager()->enqueue_update_rumble(port, data[1], data[0]);
|
||||
Display::GetMainDisplay()->get_input_manager()->enqueue_update_rumble(port, data[1],
|
||||
data[0] * 255);
|
||||
return 1; // TODO - assuming 1 means rumble is supported, and 0 is no?
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -319,7 +319,6 @@ The cpad-set-buzz! function can be used for vibration.
|
||||
)
|
||||
(when (< (the-as uint 192) (-> pad direct 1))
|
||||
(set! (-> pad direct 0) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(set! (-> pad button0-abs 2) (-> pad button0-abs 1))
|
||||
(set! (-> pad button0-abs 1) (-> pad button0-shadow-abs 0))
|
||||
|
||||
Reference in New Issue
Block a user