From f8281378574f9777de79f1d7f272a3967c75d15f Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 25 Jun 2025 22:58:19 -0400 Subject: Emit error message when pfd is not available (#372) Co-authored-by: MegaMech --- src/port/GameExtractor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/port/GameExtractor.cpp') 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 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()) { -- cgit v1.2.3