mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-10-20 02:23:50 -04:00
Show message when no Linux file picker is found (#7339)
This commit is contained in:
@@ -318,6 +318,18 @@ bool Extractor::GetRomPathFromBox() {
|
||||
}
|
||||
mCurrentRomPath = nameBuffer;
|
||||
#else
|
||||
if (!pfd::settings::available()) {
|
||||
std::string msg =
|
||||
"No file picker was found on your system. Ship of Harkinian needs one of these to select a ROM:\n\n"
|
||||
" - GNOME, Xfce, Cinnamon and other GTK desktops: install \"zenity\"\n"
|
||||
" - KDE Plasma: install \"kdialog\"\n\n"
|
||||
"On other distributions or window managers, search your package manager.\n\n"
|
||||
"Alternatively, place your ROM in:\n" +
|
||||
mSearchPath + "\nand restart.";
|
||||
ShowErrorBox("File Picker Unavailable", msg.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
auto selection = pfd::open_file("Select a file", mSearchPath, { "N64 Roms", "*.z64 *.n64 *.v64" }).result();
|
||||
|
||||
if (selection.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user