shader cache: Fix Linux boot issues (#1709)
* shader cache: Fix Linux boot issues This rollback the init logic back to previous state, and replicate the way PTC handle initialization. * shader cache: set default state of ready for translation event to false * Fix cpu unit tests
This commit is contained in:
parent
cc60ba9d22
commit
863edae328
7 changed files with 48 additions and 60 deletions
|
@ -1,3 +1,4 @@
|
|||
using ARMeilleure.Translation;
|
||||
using ARMeilleure.Translation.PTC;
|
||||
using Gtk;
|
||||
using LibHac.Common;
|
||||
|
@ -39,7 +40,6 @@ namespace Ryujinx.Ui
|
|||
public static GlRenderer GlWidget => _glWidget;
|
||||
|
||||
private static AutoResetEvent _deviceExitStatus = new AutoResetEvent(false);
|
||||
private static AutoResetEvent _widgetInitEvent = new AutoResetEvent(false);
|
||||
|
||||
private static ListStore _tableStore;
|
||||
|
||||
|
@ -435,30 +435,6 @@ namespace Ryujinx.Ui
|
|||
}
|
||||
}
|
||||
|
||||
_widgetInitEvent.Reset();
|
||||
|
||||
#if MACOS_BUILD
|
||||
CreateGameWindow(device);
|
||||
#else
|
||||
Thread windowThread = new Thread(() =>
|
||||
{
|
||||
CreateGameWindow(device);
|
||||
})
|
||||
{
|
||||
Name = "GUI.WindowThread"
|
||||
};
|
||||
|
||||
windowThread.Start();
|
||||
#endif
|
||||
|
||||
_widgetInitEvent.WaitOne();
|
||||
|
||||
// Make sure the widget get initialized by forcing an update of GTK
|
||||
while (Application.EventsPending())
|
||||
{
|
||||
Application.RunIteration();
|
||||
}
|
||||
|
||||
Logger.Notice.Print(LogClass.Application, $"Using Firmware Version: {firmwareVersion?.VersionString}");
|
||||
|
||||
if (Directory.Exists(path))
|
||||
|
@ -519,24 +495,26 @@ namespace Ryujinx.Ui
|
|||
return;
|
||||
}
|
||||
|
||||
string titleNameSection = string.IsNullOrWhiteSpace(device.Application.TitleName) ? string.Empty
|
||||
: $" - {device.Application.TitleName}";
|
||||
|
||||
string titleVersionSection = string.IsNullOrWhiteSpace(device.Application.DisplayVersion) ? string.Empty
|
||||
: $" v{device.Application.DisplayVersion}";
|
||||
|
||||
string titleIdSection = string.IsNullOrWhiteSpace(device.Application.TitleIdText) ? string.Empty
|
||||
: $" ({device.Application.TitleIdText.ToUpper()})";
|
||||
|
||||
string titleArchSection = device.Application.TitleIs64Bit ? " (64-bit)" : " (32-bit)";
|
||||
|
||||
Title = $"Ryujinx {Program.Version}{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
|
||||
|
||||
_emulationContext = device;
|
||||
_gamePath = path;
|
||||
|
||||
_deviceExitStatus.Reset();
|
||||
|
||||
Translator.IsReadyForTranslation.Reset();
|
||||
#if MACOS_BUILD
|
||||
CreateGameWindow(device);
|
||||
#else
|
||||
Thread windowThread = new Thread(() =>
|
||||
{
|
||||
CreateGameWindow(device);
|
||||
})
|
||||
{
|
||||
Name = "GUI.WindowThread"
|
||||
};
|
||||
|
||||
windowThread.Start();
|
||||
#endif
|
||||
|
||||
_gameLoaded = true;
|
||||
_stopEmulation.Sensitive = true;
|
||||
|
||||
|
@ -559,7 +537,7 @@ namespace Ryujinx.Ui
|
|||
_windowsMultimediaTimerResolution = new WindowsMultimediaTimerResolution(1);
|
||||
}
|
||||
|
||||
_glWidget = new GlRenderer(device, ConfigurationState.Instance.Logger.GraphicsDebugLevel);
|
||||
_glWidget = new GlRenderer(_emulationContext, ConfigurationState.Instance.Logger.GraphicsDebugLevel);
|
||||
|
||||
Application.Invoke(delegate
|
||||
{
|
||||
|
@ -576,8 +554,6 @@ namespace Ryujinx.Ui
|
|||
}
|
||||
});
|
||||
|
||||
_widgetInitEvent.Set();
|
||||
|
||||
_glWidget.WaitEvent.WaitOne();
|
||||
|
||||
_glWidget.Start();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue