Window manager refactor
This commit is contained in:
parent
69752efb38
commit
1469cac9bf
1 changed files with 12 additions and 12 deletions
|
@ -4,19 +4,19 @@ namespace Ryujinx.Profiler.UI
|
||||||
{
|
{
|
||||||
public class ProfileWindowManager
|
public class ProfileWindowManager
|
||||||
{
|
{
|
||||||
private ProfileWindow Window;
|
private ProfileWindow _window;
|
||||||
private Thread ProfileThread;
|
private Thread _profileThread;
|
||||||
|
|
||||||
public ProfileWindowManager()
|
public ProfileWindowManager()
|
||||||
{
|
{
|
||||||
if (Profile.ProfilingEnabled())
|
if (Profile.ProfilingEnabled())
|
||||||
{
|
{
|
||||||
ProfileThread = new Thread(() =>
|
_profileThread = new Thread(() =>
|
||||||
{
|
{
|
||||||
Window = new ProfileWindow();
|
_window = new ProfileWindow();
|
||||||
Window.Run(60, 60);
|
_window.Run(60, 60);
|
||||||
});
|
});
|
||||||
ProfileThread.Start();
|
_profileThread.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,21 +24,21 @@ namespace Ryujinx.Profiler.UI
|
||||||
{
|
{
|
||||||
if (Profile.ProfilingEnabled())
|
if (Profile.ProfilingEnabled())
|
||||||
{
|
{
|
||||||
Window.ToggleVisible();
|
_window.ToggleVisible();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
if (Window != null)
|
if (_window != null)
|
||||||
{
|
{
|
||||||
Window.Close();
|
_window.Close();
|
||||||
Window.Dispose();
|
_window.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfileThread.Join();
|
_profileThread.Join();
|
||||||
|
|
||||||
Window = null;
|
_window = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue