From 403b93daf6077ca463e2c67abc714759f7cbfb01 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 29 Jun 2022 19:31:44 +1000 Subject: [PATCH] Qt: Fix drag/drop of blockdumps --- pcsx2/VMManager.cpp | 7 ++++++- pcsx2/VMManager.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pcsx2/VMManager.cpp b/pcsx2/VMManager.cpp index a112785efc..b71dcccec1 100644 --- a/pcsx2/VMManager.cpp +++ b/pcsx2/VMManager.cpp @@ -1335,6 +1335,11 @@ bool VMManager::IsElfFileName(const std::string_view& path) return StringUtil::EndsWithNoCase(path, ".elf"); } +bool VMManager::IsBlockDumpFileName(const std::string_view& path) +{ + return StringUtil::EndsWithNoCase(path, ".dump"); +} + bool VMManager::IsGSDumpFileName(const std::string_view& path) { return (StringUtil::EndsWithNoCase(path, ".gs") || @@ -1349,7 +1354,7 @@ bool VMManager::IsSaveStateFileName(const std::string_view& path) bool VMManager::IsLoadableFileName(const std::string_view& path) { - return IsElfFileName(path) || IsGSDumpFileName(path) || GameList::IsScannableFilename(path); + return IsElfFileName(path) || IsGSDumpFileName(path) || IsBlockDumpFileName(path) || GameList::IsScannableFilename(path); } void VMManager::Execute() diff --git a/pcsx2/VMManager.h b/pcsx2/VMManager.h index aa1c72e25c..fcffe631a8 100644 --- a/pcsx2/VMManager.h +++ b/pcsx2/VMManager.h @@ -140,6 +140,9 @@ namespace VMManager /// Returns true if the specified path is an ELF. bool IsElfFileName(const std::string_view& path); + /// Returns true if the specified path is a blockdump. + bool IsBlockDumpFileName(const std::string_view& path); + /// Returns true if the specified path is a GS Dump. bool IsGSDumpFileName(const std::string_view& path);