0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-22 22:45:48 +00:00

ui: Fix segfault on Linux when passing a program via command line (#764)

This commit is contained in:
Thomas Guillemard 2019-09-08 03:59:41 +02:00 committed by jduncanator
parent 7ff394e68a
commit 9afb8ad485
2 changed files with 6 additions and 3 deletions

View file

@ -30,6 +30,11 @@ namespace Ryujinx
gtkApplication.AddWindow(mainWindow); gtkApplication.AddWindow(mainWindow);
mainWindow.Show(); mainWindow.Show();
if (args.Length == 1)
{
mainWindow.LoadApplication(args[0]);
}
Application.Run(); Application.Run();
} }

View file

@ -131,8 +131,6 @@ namespace Ryujinx.UI
UpdateGameTable(); UpdateGameTable();
// Temporary code section end // Temporary code section end
LoadApplication(args[0]);
} }
else else
{ {
@ -202,7 +200,7 @@ namespace Ryujinx.UI
StyleContext.AddProviderForScreen(Gdk.Screen.Default, cssProvider, 800); StyleContext.AddProviderForScreen(Gdk.Screen.Default, cssProvider, 800);
} }
private void LoadApplication(string path) internal void LoadApplication(string path)
{ {
if (_gameLoaded) if (_gameLoaded)
{ {