Skip to content
Permalink
Browse files

Master: Fix GUI freezing in mini Window mode when moving around in pa…

…use mode
  • Loading branch information...
Sebastiii committed Feb 26, 2019
1 parent 3e787a0 commit a09565ea2a7150774661d69327c5ba01881f49ed
Showing with 13 additions and 7 deletions.
  1. +13 −7 mediaportal/Core/Player/g_player.cs
@@ -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;
}
}
@@ -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;
}

@@ -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;
}

@@ -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;
}

@@ -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;
}

@@ -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)
{
@@ -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;
}

0 comments on commit a09565e

Please sign in to comment.
You can’t perform that action at this time.