GetModule(NULL).

This commit is contained in:
Ben Vanik 2014-01-18 23:36:36 -08:00
parent 5fa82364ba
commit 5319b31829
1 changed files with 5 additions and 1 deletions

View File

@ -63,7 +63,11 @@ KernelState* KernelState::shared() {
} }
XModule* KernelState::GetModule(const char* name) { XModule* KernelState::GetModule(const char* name) {
if (xestrcasecmpa(name, "xam.xex") == 0) { if (!name) {
// NULL name = self.
// TODO(benvanik): lookup module from caller address.
return GetExecutableModule();
} else if (xestrcasecmpa(name, "xam.xex") == 0) {
auto module = emulator_->xam(); auto module = emulator_->xam();
module->Retain(); module->Retain();
return module; return module;