mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 11:24:27 +01:00
Merge pull request #11313 from unknownbrackets/load-race
UI: Delay game config/discord until game info load
This commit is contained in:
3 files changed
+14
-6
No files matched your search
@@ -99,7 +99,7 @@ static const LogNameTableEntry logTable[] = {
|
||||
{LogTypes::SCECTRL, "SCECTRL"},
|
||||
{LogTypes::SCEDISPLAY, "SCEDISP"},
|
||||
{LogTypes::SCEFONT, "SCEFONT"},
|
||||
{LogTypes::SCEGE, "SCESCEGE"},
|
||||
{LogTypes::SCEGE, "SCEGE"},
|
||||
{LogTypes::SCEINTC, "SCEINTC"},
|
||||
{LogTypes::SCEIO, "SCEIO"},
|
||||
{LogTypes::SCEKERNEL, "SCEKERNEL"},
|
||||
|
||||
+7
-4
@@ -189,9 +189,14 @@ void EmuScreen::bootGame(const std::string &filename) {
|
||||
|
||||
I18NCategory *sc = GetI18NCategory("Screen");
|
||||
|
||||
//pre-emptive loading of game specific config if possible, to get all the settings
|
||||
invalid_ = true;
|
||||
|
||||
// We don't want to boot with the wrong game specific config, so wait until info is ready.
|
||||
std::shared_ptr<GameInfo> info = g_gameInfoCache->GetInfo(nullptr, filename, 0);
|
||||
if (info && !info->id.empty()) {
|
||||
if (!info || info->pending)
|
||||
return;
|
||||
|
||||
if (!info->id.empty()) {
|
||||
g_Config.loadGameConfig(info->id);
|
||||
// Reset views in case controls are in a different place.
|
||||
RecreateViews();
|
||||
@@ -201,8 +206,6 @@ void EmuScreen::bootGame(const std::string &filename) {
|
||||
g_Discord.SetPresenceGame(sc->T("Untitled PSP game"));
|
||||
}
|
||||
|
||||
invalid_ = true;
|
||||
|
||||
CoreParameter coreParam{};
|
||||
coreParam.cpuCore = (CPUCore)g_Config.iCpuCore;
|
||||
coreParam.gpuCore = GPUCORE_GLES;
|
||||
|
||||
@@ -353,8 +353,10 @@ public:
|
||||
}
|
||||
|
||||
void run() override {
|
||||
if (!info_->LoadFromPath(gamePath_))
|
||||
if (!info_->LoadFromPath(gamePath_)) {
|
||||
info_->pending = false;
|
||||
return;
|
||||
}
|
||||
// In case of a remote file, check if it actually exists before locking.
|
||||
if (!info_->GetFileLoader()->Exists()) {
|
||||
info_->pending = false;
|
||||
@@ -381,6 +383,7 @@ public:
|
||||
goto handleELF;
|
||||
}
|
||||
ERROR_LOG(LOADER, "invalid pbp %s\n", pbpLoader->Path().c_str());
|
||||
info_->pending = false;
|
||||
info_->working = false;
|
||||
return;
|
||||
}
|
||||
@@ -549,11 +552,13 @@ handleELF:
|
||||
// few files.
|
||||
auto fl = info_->GetFileLoader();
|
||||
if (!fl) {
|
||||
info_->pending = false;
|
||||
info_->working = false;
|
||||
return; // Happens with UWP currently, TODO...
|
||||
}
|
||||
BlockDevice *bd = constructBlockDevice(info_->GetFileLoader().get());
|
||||
if (!bd) {
|
||||
info_->pending = false;
|
||||
info_->working = false;
|
||||
return; // nothing to do here..
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user