[Core] Use a macro for loading kernel modules (which also explicitly discards return value).

This commit is contained in:
gibbed 2019-07-29 13:26:09 -05:00
parent ecf64d8e05
commit e38be4c294
1 changed files with 6 additions and 3 deletions

View File

@ -201,10 +201,13 @@ X_STATUS Emulator::Setup(
} }
} }
#define LOAD_KERNEL_MODULE(t) \
static_cast<void>(kernel_state_->LoadKernelModule<kernel::t>())
// HLE kernel modules. // HLE kernel modules.
kernel_state_->LoadKernelModule<kernel::xboxkrnl::XboxkrnlModule>(); LOAD_KERNEL_MODULE(xboxkrnl::XboxkrnlModule);
kernel_state_->LoadKernelModule<kernel::xam::XamModule>(); LOAD_KERNEL_MODULE(xam::XamModule);
kernel_state_->LoadKernelModule<kernel::xbdm::XbdmModule>(); LOAD_KERNEL_MODULE(xbdm::XbdmModule);
#undef LOAD_KERNEL_MODULE
// Initialize emulator fallback exception handling last. // Initialize emulator fallback exception handling last.
ExceptionHandler::Install(Emulator::ExceptionCallbackThunk, this); ExceptionHandler::Install(Emulator::ExceptionCallbackThunk, this);