Fix dolphin open panel filter, force X11 on linux launcher
This commit is contained in:
parent
c3fa3a1728
commit
5bda353d57
|
@ -74,7 +74,7 @@ CQuickplayPropertyEditor::~CQuickplayPropertyEditor()
|
||||||
|
|
||||||
void CQuickplayPropertyEditor::BrowseForDolphin()
|
void CQuickplayPropertyEditor::BrowseForDolphin()
|
||||||
{
|
{
|
||||||
QString Path = UICommon::OpenFileDialog(this, "Open Dolphin", "Dolphin");
|
QString Path = NDolphinIntegration::AskForDolphinPath(this);
|
||||||
|
|
||||||
if (!Path.isEmpty())
|
if (!Path.isEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -95,7 +95,7 @@ EQuickplayLaunchResult LaunchQuickplay(QWidget* pParentWidget,
|
||||||
if (Path.isEmpty())
|
if (Path.isEmpty())
|
||||||
{
|
{
|
||||||
// Allow the user to select the Dolphin exe.
|
// 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));
|
bool bGotDolphin = (!Path.isEmpty() && SetDolphinPath(pParentWidget, Path, true));
|
||||||
|
@ -331,6 +331,19 @@ QString GetDolphinPath()
|
||||||
return Path;
|
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. */
|
/** Saves/retrieves the given quickplay settings to/from QSettings. */
|
||||||
void SaveQuickplayParameters(const SQuickplayParameters& kParms)
|
void SaveQuickplayParameters(const SQuickplayParameters& kParms)
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,6 +116,9 @@ bool SetDolphinPath(QWidget* pParentWidget,
|
||||||
/** Retrieves the user path to Dolphin. */
|
/** Retrieves the user path to Dolphin. */
|
||||||
QString GetDolphinPath();
|
QString GetDolphinPath();
|
||||||
|
|
||||||
|
/** Prompt user to select dolphin binary. */
|
||||||
|
QString AskForDolphinPath(QWidget* pParentWidget);
|
||||||
|
|
||||||
/** Saves/retrieves the given quickplay settings to/from QSettings. */
|
/** Saves/retrieves the given quickplay settings to/from QSettings. */
|
||||||
void SaveQuickplayParameters(const SQuickplayParameters& kParms);
|
void SaveQuickplayParameters(const SQuickplayParameters& kParms);
|
||||||
void LoadQuickplayParameters(SQuickplayParameters& Parms);
|
void LoadQuickplayParameters(SQuickplayParameters& Parms);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Name=Prime World Editor
|
Name=Prime World Editor
|
||||||
GenericName=Game Data Editor
|
GenericName=Game Data Editor
|
||||||
Comment=Edit world assets from games by Retro Studios
|
Comment=Edit world assets from games by Retro Studios
|
||||||
Exec=PrimeWorldEditor
|
Exec=env QT_QPA_PLATFORM=xcb PrimeWorldEditor
|
||||||
Icon=PrimeWorldEditor
|
Icon=PrimeWorldEditor
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
|
|
Loading…
Reference in New Issue