mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 15:13:37 +02:00
Block until game info is ready in LaunchFile
When launching a file from outside the main screen (file association, shortcut, drag-and-drop), the info hasn't been computed yet, so the file type and ID checks that decide what to do with the file were reading empty data. Add GameInfo::WaitUntilReady() - a condition variable signalled from MarkReadyNoLock(), which every exit path of the work item goes through - and use it there. Also demote a noisy PRX decryption log line to DEBUG. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EMLTdwyyzU6Mze3w8VC2JL
This commit is contained in:
co-authored by
Claude Opus 5
parent
cc1cdfcec4
commit
65592effc5
+5
-2
@@ -70,8 +70,11 @@ static void LaunchFile(ScreenManager *screenManager, Screen *currentScreen, cons
|
||||
} else {
|
||||
// Check if we already know that this game isn't playable.
|
||||
// If coming from the main screen, the info will already be computed here since the icon is displayed etc.
|
||||
// Otherwise, we probably technically should wait for it...
|
||||
auto info = g_gameInfoCache->GetInfo(nullptr, path, GameInfoFlags::FILE_TYPE | GameInfoFlags::PARAM_SFO);
|
||||
// Otherwise (launching from a file association, a shortcut, drag-and-drop...) we have to block until
|
||||
// it's available - we can't decide what to do below without it.
|
||||
const GameInfoFlags neededFlags = GameInfoFlags::FILE_TYPE | GameInfoFlags::PARAM_SFO;
|
||||
std::shared_ptr<GameInfo> info = g_gameInfoCache->GetInfo(nullptr, path, neededFlags);
|
||||
info->WaitUntilReady(neededFlags);
|
||||
|
||||
switch (info->fileType) {
|
||||
case IdentifiedFileType::PSP_UMD_VIDEO_ISO:
|
||||
|
||||
Reference in New Issue
Block a user