From e38be4c294b1a244129900f97e21edad8b800ef0 Mon Sep 17 00:00:00 2001 From: gibbed Date: Mon, 29 Jul 2019 13:26:09 -0500 Subject: [PATCH] [Core] Use a macro for loading kernel modules (which also explicitly discards return value). --- src/xenia/emulator.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index 3525f0742..81fe5cf57 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -201,10 +201,13 @@ X_STATUS Emulator::Setup( } } +#define LOAD_KERNEL_MODULE(t) \ + static_cast(kernel_state_->LoadKernelModule()) // HLE kernel modules. - kernel_state_->LoadKernelModule(); - kernel_state_->LoadKernelModule(); - kernel_state_->LoadKernelModule(); + LOAD_KERNEL_MODULE(xboxkrnl::XboxkrnlModule); + LOAD_KERNEL_MODULE(xam::XamModule); + LOAD_KERNEL_MODULE(xbdm::XbdmModule); +#undef LOAD_KERNEL_MODULE // Initialize emulator fallback exception handling last. ExceptionHandler::Install(Emulator::ExceptionCallbackThunk, this);