mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-16 14:26:33 +00:00
Compare commits
4 Commits
6e65eb2b93
...
31a9eb9419
Author | SHA1 | Date | |
---|---|---|---|
|
31a9eb9419 | ||
|
869732e8ed | ||
|
7fca6ad333 | ||
|
32b4e9d136 |
@ -318,15 +318,13 @@ namespace Ryujinx
|
||||
{
|
||||
if (mainWindow.ApplicationLibrary.TryGetApplicationsFromFile(CommandLineState.LaunchPathArg, out List<ApplicationData> applications))
|
||||
{
|
||||
ApplicationData applicationData;
|
||||
|
||||
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
|
||||
{
|
||||
@ -336,8 +334,7 @@ namespace Ryujinx
|
||||
}
|
||||
else
|
||||
{
|
||||
applicationData = applications[0];
|
||||
mainWindow.RunApplication(applicationData, CommandLineState.StartFullscreenArg);
|
||||
mainWindow.RunApplication(applications[0], CommandLineState.StartFullscreenArg);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -71,10 +71,11 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
|
||||
|
||||
if (applicationId == 0)
|
||||
{
|
||||
foreach ((ulong _, ContentMetaData content) in applications)
|
||||
foreach ((ulong id, ContentMetaData content) in applications)
|
||||
{
|
||||
mainNca = content.GetNcaByType(device.FileSystem.KeySet, ContentType.Program, device.Configuration.UserChannelPersistence.Index);
|
||||
controlNca = content.GetNcaByType(device.FileSystem.KeySet, ContentType.Control, device.Configuration.UserChannelPersistence.Index);
|
||||
applicationId = id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -142,7 +143,24 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
|
||||
}
|
||||
}
|
||||
|
||||
return (true, mainNca.Load(device, patchNca, controlNca));
|
||||
try
|
||||
{
|
||||
return (true, mainNca.Load(device, patchNca, controlNca));
|
||||
}
|
||||
catch (HorizonResultException ex)
|
||||
{
|
||||
// The exception message already contains enough information here.
|
||||
errorMessage = $"Failed to load: {ex.Message}";
|
||||
|
||||
return (false, ProcessResult.Failed);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Add the stacktrace in addition to the exception message.
|
||||
errorMessage = $"Failed to load: {ex}";
|
||||
|
||||
return (false, ProcessResult.Failed);
|
||||
}
|
||||
}
|
||||
|
||||
errorMessage = $"Unable to load: Could not find Main NCA for title \"{applicationId:X16}\"";
|
||||
|
@ -576,19 +576,13 @@ namespace Ryujinx.UI.App.Common
|
||||
{
|
||||
AppData = application,
|
||||
});
|
||||
}
|
||||
|
||||
if (applications.Count > 1)
|
||||
{
|
||||
numApplicationsFound += applications.Count - 1;
|
||||
numApplicationsFound++;
|
||||
numApplicationsLoaded++;
|
||||
}
|
||||
}
|
||||
|
||||
numApplicationsLoaded += applications.Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
numApplicationsFound--;
|
||||
}
|
||||
numApplicationsFound--;
|
||||
|
||||
OnApplicationCountUpdated(new ApplicationCountUpdatedEventArgs
|
||||
{
|
||||
|
@ -325,15 +325,13 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
if (ApplicationLibrary.TryGetApplicationsFromFile(_launchPath, out List<ApplicationData> applications))
|
||||
{
|
||||
ApplicationData applicationData;
|
||||
|
||||
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
|
||||
{
|
||||
@ -343,8 +341,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
}
|
||||
else
|
||||
{
|
||||
applicationData = applications[0];
|
||||
await ViewModel.LoadApplication(applicationData, _startFullscreen);
|
||||
await ViewModel.LoadApplication(applications[0], _startFullscreen);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user