mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-25 18:13:04 +00:00
Fix check for application id when launching directly from the command line
This commit is contained in:
parent
32b4e9d136
commit
7fca6ad333
2 changed files with 8 additions and 14 deletions
|
@ -331,15 +331,13 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
if (mainWindow.ApplicationLibrary.TryGetApplicationsFromFile(CommandLineState.LaunchPathArg, out List<ApplicationData> applications))
|
if (mainWindow.ApplicationLibrary.TryGetApplicationsFromFile(CommandLineState.LaunchPathArg, out List<ApplicationData> applications))
|
||||||
{
|
{
|
||||||
ApplicationData applicationData;
|
|
||||||
|
|
||||||
if (CommandLineState.LaunchApplicationId != null)
|
if (CommandLineState.LaunchApplicationId != null)
|
||||||
{
|
{
|
||||||
applicationData = applications.Find(application => application.IdString == CommandLineState.LaunchApplicationId);
|
int applicationIndex = applications.FindIndex(application => application.IdString.Equals(CommandLineState.LaunchApplicationId, StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
|
||||||
if (applicationData != null)
|
if (applicationIndex != -1)
|
||||||
{
|
{
|
||||||
mainWindow.RunApplication(applicationData, CommandLineState.StartFullscreenArg);
|
mainWindow.RunApplication(applications[applicationIndex], CommandLineState.StartFullscreenArg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -349,8 +347,7 @@ namespace Ryujinx
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
applicationData = applications[0];
|
mainWindow.RunApplication(applications[0], CommandLineState.StartFullscreenArg);
|
||||||
mainWindow.RunApplication(applicationData, CommandLineState.StartFullscreenArg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -325,15 +325,13 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
if (ApplicationLibrary.TryGetApplicationsFromFile(_launchPath, out List<ApplicationData> applications))
|
if (ApplicationLibrary.TryGetApplicationsFromFile(_launchPath, out List<ApplicationData> applications))
|
||||||
{
|
{
|
||||||
ApplicationData applicationData;
|
|
||||||
|
|
||||||
if (_launchApplicationId != null)
|
if (_launchApplicationId != null)
|
||||||
{
|
{
|
||||||
applicationData = applications.Find(application => application.IdString == _launchApplicationId);
|
int applicationIndex = applications.FindIndex(application => application.IdString.Equals(_launchApplicationId, StringComparison.InvariantCultureIgnoreCase));
|
||||||
|
|
||||||
if (applicationData != null)
|
if (applicationIndex != -1)
|
||||||
{
|
{
|
||||||
await ViewModel.LoadApplication(applicationData, _startFullscreen);
|
await ViewModel.LoadApplication(applications[applicationIndex], _startFullscreen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -343,8 +341,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
applicationData = applications[0];
|
await ViewModel.LoadApplication(applications[0], _startFullscreen);
|
||||||
await ViewModel.LoadApplication(applicationData, _startFullscreen);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue