Fix dolphin open panel filter, force X11 on linux launcher

This commit is contained in:
Jack Andersen 2020-03-30 13:50:07 -10:00
parent c3fa3a1728
commit 5bda353d57
4 changed files with 19 additions and 3 deletions

View File

@ -74,7 +74,7 @@ CQuickplayPropertyEditor::~CQuickplayPropertyEditor()
void CQuickplayPropertyEditor::BrowseForDolphin()
{
QString Path = UICommon::OpenFileDialog(this, "Open Dolphin", "Dolphin");
QString Path = NDolphinIntegration::AskForDolphinPath(this);
if (!Path.isEmpty())
{

View File

@ -95,7 +95,7 @@ EQuickplayLaunchResult LaunchQuickplay(QWidget* pParentWidget,
if (Path.isEmpty())
{
// Allow the user to select the Dolphin exe.
Path = UICommon::OpenFileDialog(pParentWidget, "Open Dolphin", "Dolphin");
Path = AskForDolphinPath(pParentWidget);
}
bool bGotDolphin = (!Path.isEmpty() && SetDolphinPath(pParentWidget, Path, true));
@ -331,6 +331,19 @@ QString GetDolphinPath()
return Path;
}
QString AskForDolphinPath(QWidget* pParentWidget) {
#if Q_OS_WIN
QString Path = UICommon::OpenFileDialog(pParentWidget, "Open Dolphin", "*.exe");
#elif Q_OS_MACOS
QString Path = UICommon::OpenFileDialog(pParentWidget, "Open Dolphin", "*.app");
if (Path.endsWith(".app"))
Path += "/Contents/MacOS/Dolphin";
#else
QString Path = UICommon::OpenFileDialog(pParentWidget, "Open Dolphin", {});
#endif
return Path;
}
/** Saves/retrieves the given quickplay settings to/from QSettings. */
void SaveQuickplayParameters(const SQuickplayParameters& kParms)
{

View File

@ -116,6 +116,9 @@ bool SetDolphinPath(QWidget* pParentWidget,
/** Retrieves the user path to Dolphin. */
QString GetDolphinPath();
/** Prompt user to select dolphin binary. */
QString AskForDolphinPath(QWidget* pParentWidget);
/** Saves/retrieves the given quickplay settings to/from QSettings. */
void SaveQuickplayParameters(const SQuickplayParameters& kParms);
void LoadQuickplayParameters(SQuickplayParameters& Parms);

View File

@ -2,7 +2,7 @@
Name=Prime World Editor
GenericName=Game Data Editor
Comment=Edit world assets from games by Retro Studios
Exec=PrimeWorldEditor
Exec=env QT_QPA_PLATFORM=xcb PrimeWorldEditor
Icon=PrimeWorldEditor
Terminal=false
Type=Application