mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-04 09:06:23 +02:00
Refactor process lifecycle to use Start, Tick, Stop methods and metrics
This commit is contained in:
@@ -10,7 +10,7 @@ internal class DesktopProcess() : Process("Desktop Manager")
|
||||
{
|
||||
private static bool isGraphicsInitialized = false;
|
||||
|
||||
internal override void Run(string[] args)
|
||||
internal override void Start(string[] args)
|
||||
{
|
||||
if (!isGraphicsInitialized)
|
||||
{
|
||||
@@ -54,13 +54,15 @@ internal class DesktopProcess() : Process("Desktop Manager")
|
||||
|
||||
testWindow.AutoFlush = true;
|
||||
testWindow.Flush();
|
||||
}
|
||||
|
||||
while (!StopRequested)
|
||||
internal override void Tick()
|
||||
{
|
||||
WindowManager.Update();
|
||||
|
||||
if (!ProcessManager.IsProcessRunning<TerminalProcess>())
|
||||
{
|
||||
WindowManager.Update();
|
||||
|
||||
// Sleep slightly to yield CPU to the main CLI thread (approx 60 FPS)
|
||||
//Thread.Sleep(16);
|
||||
ProcessManager.SpawnProcess<TerminalProcess>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user