Skip to content

Commit

Permalink
Master: Fix GUI freezing in mini Window mode when moving around in pa…
Browse files Browse the repository at this point in the history
…use mode
  • Loading branch information
Sebastiii committed Mar 1, 2019
1 parent 3e787a0 commit a09565e
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions mediaportal/Core/Player/g_player.cs
Expand Up @@ -2323,6 +2323,7 @@ public static void SeekRelative(double dTime)
// Restore GUIGraphicsContext.State
if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.SUSPENDING)
{
Log.Debug("g_Player: SeekRelative GUIGraphicsContext.State.RUNNING");
GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.RUNNING;
}
}
Expand All @@ -2332,6 +2333,7 @@ public static void StepNow()
// Suspending GUIGraphicsContext.State
if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING)
{
Log.Debug("g_Player: StepNow GUIGraphicsContext.State.SUSPENDING");
GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.SUSPENDING;
}

Expand Down Expand Up @@ -2538,6 +2540,7 @@ public static void SeekRelativePercentage(int iPercentage)
// Suspending GUIGraphicsContext.State
if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING)
{
Log.Debug("g_Player: SeekRelativePercentage GUIGraphicsContext.State.SUSPENDING");
GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.SUSPENDING;
}

Expand All @@ -2564,6 +2567,7 @@ public static void SeekAbsolute(double dTime)
// Suspending GUIGraphicsContext.State
if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING)
{
Log.Debug("g_Player: SeekAbsolute GUIGraphicsContext.State.SUSPENDING");
GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.SUSPENDING;
}

Expand Down Expand Up @@ -2593,6 +2597,7 @@ public static void SeekAsolutePercentage(int iPercentage)
// Suspending GUIGraphicsContext.State
if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING)
{
Log.Debug("g_Player: SeekAsolutePercentage GUIGraphicsContext.State.SUSPENDING");
GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.SUSPENDING;
}

Expand Down Expand Up @@ -2799,17 +2804,17 @@ public static void Process()

public static void RefreshMadVrVideo()
{
// Enable a new VideoWindow update
lock (GUIGraphicsContext.RenderLock)
{
GUIGraphicsContext.UpdateVideoWindow = true;
VMR9Util.g_vmr9?._scene.RenderGuiRefresh(25, 25, 25, 25, true);
}

// Disabled for now - seems the workaround is not needed anymore but keep code
if (GUIGraphicsContext.VideoRenderer == GUIGraphicsContext.VideoRendererType.madVR &&
(GUIGraphicsContext.Vmr9Active || GUIGraphicsContext.ForceMadVRFirstStart))
{
// Enable a new VideoWindow update
lock (GUIGraphicsContext.RenderLock)
{
GUIGraphicsContext.UpdateVideoWindow = true;
VMR9Util.g_vmr9?._scene.RenderGuiRefresh(25, 25, 25, 25, true);
}

// TODO find a better way to restore madVR rendering (right now i send an 'X' to force refresh a current window)
if (GUIGraphicsContext.ForceMadVRFirstStart)
{
Expand Down Expand Up @@ -4015,6 +4020,7 @@ private static void OnMessage(GUIMessage message)
// Suspending GUIGraphicsContext.State
if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING)
{
Log.Debug("g_Player: GUI_MSG_ONDISPLAYMADVRCHANGED GUIGraphicsContext.State.SUSPENDING");
GUIGraphicsContext.CurrentState = GUIGraphicsContext.State.SUSPENDING;
}

Expand Down

0 comments on commit a09565e

Please sign in to comment.