summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <as@php.net>2025-06-25 22:58:19 -0400
committerGitHub <noreply@github.com>2025-06-25 20:58:19 -0600
commitf8281378574f9777de79f1d7f272a3967c75d15f (patch)
tree5a602e4a02fb476817d87873713c69a8f2a4c8cf
parentbf7823507b60ac1b49641b577f21da01de687217 (diff)
Emit error message when pfd is not available (#372)
Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
-rw-r--r--src/port/GameExtractor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/port/GameExtractor.cpp b/src/port/GameExtractor.cpp
index 0182241be..1fa9e80e8 100644
--- a/src/port/GameExtractor.cpp
+++ b/src/port/GameExtractor.cpp
@@ -17,6 +17,15 @@ std::unordered_map<std::string, std::string> mGameList = {
bool GameExtractor::SelectGameFromUI() {
#if !defined(__IOS__) && !defined(__ANDROID__) && !defined(__SWITCH__)
+ if (!pfd::settings::available()) {
+ SPDLOG_ERROR(
+ "portable-file-dialogs is not available on this system. Check "
+ "https://github.com/samhocevar/portable-file-dialogs for runtime "
+ "requirements."
+ );
+ return false;
+ }
+
auto selection = pfd::open_file("Select a file", ".", { "N64 Roms", "*.z64" }).result();
if (selection.empty()) {