Skip to content

Commit

Permalink
Merge pull request #18814 from hrydgard/hide-extracted-iso-warning
Browse files Browse the repository at this point in the history
Hide the extracted ISO warning if ppsspp-index.lst is present.
  • Loading branch information
hrydgard committed Feb 2, 2024
2 parents 7f2885e + ca6e0f4 commit e226ef6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Core/FileSystems/VirtualDiscFileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "Core/FileSystems/FileSystem.h"
#include "Core/FileSystems/DirectoryFileSystem.h"

extern const std::string INDEX_FILENAME;

class VirtualDiscFileSystem: public IFileSystem {
public:
VirtualDiscFileSystem(IHandleAllocator *_hAlloc, const Path &_basePath);
Expand Down
10 changes: 9 additions & 1 deletion UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ using namespace std::placeholders;
#include "Common/Render/TextureAtlas.h"
#include "Common/GPU/OpenGL/GLFeatures.h"
#include "Common/Render/Text/draw_text.h"
#include "Common/File/FileUtil.h"
#include "Common/Battery/Battery.h"

#include "Common/UI/Root.h"
Expand Down Expand Up @@ -59,6 +60,7 @@ using namespace std::placeholders;
#include "Core/MemFault.h"
#include "Core/Reporting.h"
#include "Core/System.h"
#include "Core/FileSystems/VirtualDiscFileSystem.h"
#include "GPU/GPUState.h"
#include "GPU/GPUInterface.h"
#include "GPU/Common/FramebufferManagerCommon.h"
Expand Down Expand Up @@ -281,7 +283,13 @@ void EmuScreen::bootGame(const Path &filename) {

auto sc = GetI18NCategory(I18NCat::SCREEN);
if (info->fileType == IdentifiedFileType::PSP_DISC_DIRECTORY) {
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);
// Check for existence of ppsspp-index.lst - if it exists, the user likely knows what they're doing.
// TODO: Better would be to check that it was loaded successfully.
if (!File::Exists(filename / INDEX_FILENAME)) {
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);
} else {
INFO_LOG(LOADER, "Extracted ISO loaded without warning - %s is present.", INDEX_FILENAME.c_str());
}
}

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

0 comments on commit e226ef6

Please sign in to comment.