From a09565ea2a7150774661d69327c5ba01881f49ed Mon Sep 17 00:00:00 2001 From: sebastiii Date: Tue, 26 Feb 2019 07:23:58 +0100 Subject: [PATCH] Master: Fix GUI freezing in mini Window mode when moving around in pause mode --- mediaportal/Core/Player/g_player.cs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/mediaportal/Core/Player/g_player.cs b/mediaportal/Core/Player/g_player.cs index 1a951f839b4..de93f4d82fd 100644 --- a/mediaportal/Core/Player/g_player.cs +++ b/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; }