Move visible update to update rather than draw as it causes a lockup if called from draw
Also added profile window disposal so closing main window closes profiler too
This commit is contained in:
parent
b7faca17ee
commit
9380873764
3 changed files with 10 additions and 8 deletions
|
@ -209,6 +209,12 @@ namespace Ryujinx.Profiler.UI
|
|||
/// <remarks>There is no need to call the base implementation.</remarks>
|
||||
public void Update(FrameEventArgs e)
|
||||
{
|
||||
if (_visibleChanged)
|
||||
{
|
||||
Visible = _visible;
|
||||
_visibleChanged = false;
|
||||
}
|
||||
|
||||
// Backspace handling
|
||||
if (_backspaceDown)
|
||||
{
|
||||
|
@ -322,12 +328,6 @@ namespace Ryujinx.Profiler.UI
|
|||
/// <remarks>There is no need to call the base implementation.</remarks>
|
||||
public void Draw()
|
||||
{
|
||||
if (_visibleChanged)
|
||||
{
|
||||
Visible = _visible;
|
||||
_visibleChanged = false;
|
||||
}
|
||||
|
||||
if (!_visible || !_initComplete)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -43,8 +43,6 @@ namespace Ryujinx.Profiler.UI
|
|||
_window.Dispose();
|
||||
}
|
||||
|
||||
_profileThread.Join();
|
||||
|
||||
_window = null;
|
||||
}
|
||||
|
||||
|
|
|
@ -287,6 +287,10 @@ namespace Ryujinx
|
|||
|
||||
protected override void OnUnload(EventArgs e)
|
||||
{
|
||||
#if USE_PROFILING
|
||||
_profileWindow.Close();
|
||||
#endif
|
||||
|
||||
_renderThread.Join();
|
||||
|
||||
base.OnUnload(e);
|
||||
|
|
Loading…
Add table
Reference in a new issue