Skip to content

Commit e226ef6

Browse files
authored
Merge pull request #18814 from hrydgard/hide-extracted-iso-warning
Hide the extracted ISO warning if ppsspp-index.lst is present.
2 parents 7f2885e + ca6e0f4 commit e226ef6

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Core/FileSystems/VirtualDiscFileSystem.h

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#include "Core/FileSystems/FileSystem.h"
2626
#include "Core/FileSystems/DirectoryFileSystem.h"
2727

28+
extern const std::string INDEX_FILENAME;
29+
2830
class VirtualDiscFileSystem: public IFileSystem {
2931
public:
3032
VirtualDiscFileSystem(IHandleAllocator *_hAlloc, const Path &_basePath);

UI/EmuScreen.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ using namespace std::placeholders;
2525
#include "Common/Render/TextureAtlas.h"
2626
#include "Common/GPU/OpenGL/GLFeatures.h"
2727
#include "Common/Render/Text/draw_text.h"
28+
#include "Common/File/FileUtil.h"
2829
#include "Common/Battery/Battery.h"
2930

3031
#include "Common/UI/Root.h"
@@ -59,6 +60,7 @@ using namespace std::placeholders;
5960
#include "Core/MemFault.h"
6061
#include "Core/Reporting.h"
6162
#include "Core/System.h"
63+
#include "Core/FileSystems/VirtualDiscFileSystem.h"
6264
#include "GPU/GPUState.h"
6365
#include "GPU/GPUInterface.h"
6466
#include "GPU/Common/FramebufferManagerCommon.h"
@@ -281,7 +283,13 @@ void EmuScreen::bootGame(const Path &filename) {
281283

282284
auto sc = GetI18NCategory(I18NCat::SCREEN);
283285
if (info->fileType == IdentifiedFileType::PSP_DISC_DIRECTORY) {
284-
g_OSD.Show(OSDType::MESSAGE_CENTERED_WARNING, sc->T("ExtractedIsoWarning", "Extracted ISOs often don't work.\nPlay the ISO file directly."), gamePath_.ToVisualString(), 7.0f);
286+
// Check for existence of ppsspp-index.lst - if it exists, the user likely knows what they're doing.
287+
// TODO: Better would be to check that it was loaded successfully.
288+
if (!File::Exists(filename / INDEX_FILENAME)) {
289+
g_OSD.Show(OSDType::MESSAGE_CENTERED_WARNING, sc->T("ExtractedIsoWarning", "Extracted ISOs often don't work.\nPlay the ISO file directly."), gamePath_.ToVisualString(), 7.0f);
290+
} else {
291+
INFO_LOG(LOADER, "Extracted ISO loaded without warning - %s is present.", INDEX_FILENAME.c_str());
292+
}
285293
}
286294

287295
extraAssertInfoStr_ = info->id + " " + info->GetTitle();

0 commit comments

Comments
 (0)