[Base] Make Emulator::CompleteLaunch use SpaFile instead
This commit is contained in:
parent
52984280c3
commit
00f3627715
|
@ -662,13 +662,14 @@ X_STATUS Emulator::CompleteLaunch(const std::wstring& path,
|
||||||
uint32_t resource_size = 0;
|
uint32_t resource_size = 0;
|
||||||
if (XSUCCEEDED(
|
if (XSUCCEEDED(
|
||||||
module->GetSection(title_id, &resource_data, &resource_size))) {
|
module->GetSection(title_id, &resource_data, &resource_size))) {
|
||||||
kernel::util::XdbfGameData db(
|
kernel::util::SpaFile spa;
|
||||||
module->memory()->TranslateVirtual(resource_data), resource_size);
|
if (spa.Read(module->memory()->TranslateVirtual(resource_data),
|
||||||
if (db.is_valid()) {
|
resource_size)) {
|
||||||
game_title_ = xe::to_wstring(db.title());
|
game_title_ = xe::to_wstring(spa.GetTitle());
|
||||||
auto icon_block = db.icon();
|
auto icon_block = spa.GetIcon();
|
||||||
if (icon_block) {
|
if (icon_block) {
|
||||||
display_window_->SetIcon(icon_block.buffer, icon_block.size);
|
display_window_->SetIcon(icon_block->data.data(),
|
||||||
|
icon_block->data.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue