mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-11-07 15:15:05 +01:00
Check RT64 initialization return status
This commit is contained in:
parent
5e4d826760
commit
3b06ad52f0
@ -45,7 +45,7 @@ void dummy_check_interrupts() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RT64Init(uint8_t* rom, uint8_t* rdram, ultramodern::WindowHandle window_handle) {
|
bool RT64Init(uint8_t* rom, uint8_t* rdram, ultramodern::WindowHandle window_handle) {
|
||||||
set_rt64_hooks();
|
set_rt64_hooks();
|
||||||
// Dynamic loading
|
// Dynamic loading
|
||||||
//auto RT64 = LoadLibrary("RT64.dll");
|
//auto RT64 = LoadLibrary("RT64.dll");
|
||||||
@ -100,11 +100,11 @@ void RT64Init(uint8_t* rom, uint8_t* rdram, ultramodern::WindowHandle window_han
|
|||||||
gfx_info.RDRAM_SIZE = &RDRAM_SIZE;
|
gfx_info.RDRAM_SIZE = &RDRAM_SIZE;
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
InitiateGFXWindows(gfx_info, window_handle.window, window_handle.thread_id);
|
return InitiateGFXWindows(gfx_info, window_handle.window, window_handle.thread_id);
|
||||||
#elif defined(__ANDROID__)
|
#elif defined(__ANDROID__)
|
||||||
static_assert(false && "Unimplemented");
|
static_assert(false && "Unimplemented");
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
InitiateGFXLinux(gfx_info, window_handle.window, window_handle.display);
|
return InitiateGFXLinux(gfx_info, window_handle.window, window_handle.display);
|
||||||
#else
|
#else
|
||||||
static_assert(false && "Unimplemented");
|
static_assert(false && "Unimplemented");
|
||||||
#endif
|
#endif
|
||||||
|
@ -174,7 +174,7 @@ void dp_complete() {
|
|||||||
osSendMesg(PASS_RDRAM events_context.dp.mq, events_context.dp.msg, OS_MESG_NOBLOCK);
|
osSendMesg(PASS_RDRAM events_context.dp.mq, events_context.dp.msg, OS_MESG_NOBLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RT64Init(uint8_t* rom, uint8_t* rdram, ultramodern::WindowHandle window_handle);
|
bool RT64Init(uint8_t* rom, uint8_t* rdram, ultramodern::WindowHandle window_handle);
|
||||||
void RT64SendDL(uint8_t* rdram, const OSTask* task);
|
void RT64SendDL(uint8_t* rdram, const OSTask* task);
|
||||||
void RT64UpdateScreen(uint32_t vi_origin);
|
void RT64UpdateScreen(uint32_t vi_origin);
|
||||||
void RT64ChangeWindow();
|
void RT64ChangeWindow();
|
||||||
@ -263,7 +263,9 @@ void gfx_thread_func(uint8_t* rdram, uint8_t* rom, std::atomic_flag* thread_read
|
|||||||
ultramodern::set_native_thread_name("Gfx Thread");
|
ultramodern::set_native_thread_name("Gfx Thread");
|
||||||
ultramodern::set_native_thread_priority(ultramodern::ThreadPriority::Normal);
|
ultramodern::set_native_thread_priority(ultramodern::ThreadPriority::Normal);
|
||||||
|
|
||||||
RT64Init(rom, rdram, window_handle);
|
if (!RT64Init(rom, rdram, window_handle)) {
|
||||||
|
throw std::runtime_error("Failed to initialize RT64!");
|
||||||
|
}
|
||||||
|
|
||||||
rsp_constants_init();
|
rsp_constants_init();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user