mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2025-10-30 08:02:29 +00:00
* Start setting up user callbacks system * Implement RSP callbacks * move RSP callbacks (and related RSP stuff) to its own file * Move destroy_ui to gfx_callbacks_t and change recomp::start to require rsp_callbacks_t * error_handling.hpp * Remove UserCallbacks in favor of threads_callbacks_t * Add `ultramodern::set_callbacks` and some other cleanups * Move most RSP stuff to librecomp * Rename rsp_stuff.hpp to rsp.hpp * Add rsp.cpp to librecomp cmake file * review * Remove `recomp::message_box` * Fix missing rename
22 lines
508 B
C++
22 lines
508 B
C++
#include <cassert>
|
|
#include <cstring>
|
|
|
|
#include "ultramodern/rsp.hpp"
|
|
|
|
static ultramodern::rsp::callbacks_t rsp_callbacks {};
|
|
|
|
void ultramodern::rsp::set_callbacks(const callbacks_t& callbacks) {
|
|
rsp_callbacks = callbacks;
|
|
}
|
|
|
|
void ultramodern::rsp::init() {
|
|
if (rsp_callbacks.init != nullptr) {
|
|
rsp_callbacks.init();
|
|
}
|
|
}
|
|
|
|
bool ultramodern::rsp::run_task(RDRAM_ARG const OSTask* task) {
|
|
assert(rsp_callbacks.run_task != nullptr);
|
|
|
|
return rsp_callbacks.run_task(PASS_RDRAM task);
|
|
}
|