mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2026-05-11 03:12:15 +00:00
ULTRAMODERN_QUICK_EXIT macro
This commit is contained in:
parent
bdd42ccc7d
commit
2169fcb40b
3 changed files with 4 additions and 3 deletions
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#define ULTRAMODERN_QUICK_EXIT() ultramodern::error_handling::quick_exit(__FILE__, __LINE__, __func__)
|
||||
|
||||
namespace ultramodern {
|
||||
namespace error_handling {
|
||||
struct callbacks_t {
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ void task_thread_func(uint8_t* rdram, moodycamel::LightweightSemaphore* thread_r
|
|||
|
||||
if (!ultramodern::rsp::run_task(PASS_RDRAM task)) {
|
||||
fprintf(stderr, "Failed to execute task type: %" PRIu32 "\n", task->t.type);
|
||||
ultramodern::error_handling::quick_exit(__FILE__, __LINE__, __func__);
|
||||
ULTRAMODERN_QUICK_EXIT();
|
||||
}
|
||||
|
||||
// Tell the game that the RSP has completed
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ void ultramodern::renderer::set_callbacks(const callbacks_t& callbacks) {
|
|||
std::unique_ptr<ultramodern::renderer::RendererContext> ultramodern::renderer::create_render_context(uint8_t* rdram, WindowHandle window_handle, bool developer_mode) {
|
||||
if (render_callbacks.create_render_context == nullptr) {
|
||||
error_handling::message_box("[Error] The mandatory render callback `create_render_context` was not registered");
|
||||
// TODO: should we make a macro for this?
|
||||
error_handling::quick_exit(__FILE__, __LINE__, __func__);
|
||||
ULTRAMODERN_QUICK_EXIT();
|
||||
}
|
||||
|
||||
return render_callbacks.create_render_context(rdram, window_handle, developer_mode);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue