From 5319b3182948bca8cc79b286c229872c8113cef3 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sat, 18 Jan 2014 23:36:36 -0800 Subject: [PATCH 1/2] GetModule(NULL). --- src/xenia/kernel/kernel_state.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xenia/kernel/kernel_state.cc b/src/xenia/kernel/kernel_state.cc index d804fec9b..ecffba54a 100644 --- a/src/xenia/kernel/kernel_state.cc +++ b/src/xenia/kernel/kernel_state.cc @@ -63,7 +63,11 @@ KernelState* KernelState::shared() { } 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(); module->Retain(); return module; From 50a692d20f02caca8aa24bd2ceb162ee85f1129c Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sat, 18 Jan 2014 23:41:24 -0800 Subject: [PATCH 2/2] Allowing STFS v2 with a warning. --- src/xenia/kernel/fs/stfs.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xenia/kernel/fs/stfs.cc b/src/xenia/kernel/fs/stfs.cc index 07bb84109..10099afb9 100644 --- a/src/xenia/kernel/fs/stfs.cc +++ b/src/xenia/kernel/fs/stfs.cc @@ -42,8 +42,9 @@ bool STFSHeader::Read(const uint8_t* p) { content_type = (STFSContentType)XEGETUINT32BE(p + 0x344); metadata_version = XEGETUINT32BE(p + 0x348); if (metadata_version > 1) { - XELOGE("STFSContainer doesn't support version %d yet", metadata_version); - return false; + // This is a variant of thumbnail data/etc. + // Can just ignore it for now (until we parse thumbnails). + XELOGW("STFSContainer doesn't support version %d yet", metadata_version); } content_size = XEGETUINT32BE(p + 0x34C); media_id = XEGETUINT32BE(p + 0x354);