From af3c4f4df754bc02673aa96fed21c5badf1ebcc3 Mon Sep 17 00:00:00 2001 From: thecozies <79979276+thecozies@users.noreply.github.com> Date: Tue, 16 Apr 2024 09:10:38 -0500 Subject: [PATCH] update rumble on vi thread --- patches/input_latency.c | 4 ---- patches/syms.ld | 1 - src/game/recomp_api.cpp | 4 ---- ultramodern/events.cpp | 4 ++++ 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/patches/input_latency.c b/patches/input_latency.c index a93cb7c..9660e7d 100644 --- a/patches/input_latency.c +++ b/patches/input_latency.c @@ -33,8 +33,6 @@ typedef enum { /* 2 */ VOICE_INIT_SUCCESS // voice initialized } VoiceInitStatus; -void recomp_update_rumble(); - void PadMgr_HandleRetrace(void) { // Execute rumble callback if (sPadMgrInstance->rumbleRetraceCallback != NULL) { @@ -62,8 +60,6 @@ void PadMgr_HandleRetrace(void) { PadMgr_UpdateRumble(); --sPadMgrInstance->rumbleOnTimer; } - - recomp_update_rumble(); } void poll_inputs(void) { diff --git a/patches/syms.ld b/patches/syms.ld index 7252a30..5640bd2 100644 --- a/patches/syms.ld +++ b/patches/syms.ld @@ -46,4 +46,3 @@ osContStartReadData_recomp = 0x8F000070; osContGetReadData_recomp = 0x8F000074; osContStartQuery_recomp = 0x8F000078; osContGetQuery_recomp = 0x8F00007C; -recomp_update_rumble = 0x8F000080; diff --git a/src/game/recomp_api.cpp b/src/game/recomp_api.cpp index 30ec251..f5c7f7c 100644 --- a/src/game/recomp_api.cpp +++ b/src/game/recomp_api.cpp @@ -81,7 +81,3 @@ extern "C" void recomp_get_low_health_beeps_enabled(uint8_t* rdram, recomp_conte extern "C" void recomp_time_us(uint8_t* rdram, recomp_context* ctx) { _return(ctx, static_cast(std::chrono::duration_cast(ultramodern::time_since_start()).count())); } - -extern "C" void recomp_update_rumble(uint8_t* rdram, recomp_context* ctx) { - recomp::update_rumble(); -} diff --git a/ultramodern/events.cpp b/ultramodern/events.cpp index 8ded57f..82b62e1 100644 --- a/ultramodern/events.cpp +++ b/ultramodern/events.cpp @@ -17,6 +17,7 @@ #include "rt64_layer.h" #include "recomp.h" #include "recomp_ui.h" +#include "recomp_input.h" #include "rsp.h" struct SpTaskAction { @@ -169,6 +170,9 @@ void vi_thread_func() { } } } + + // TODO move recomp code out of ultramodern. + recomp::update_rumble(); } }