From 1f9cf53a76b0715360c1607854322f48389305e5 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 16 Apr 2014 16:31:37 +0000 Subject: [PATCH] fix a crashy bug in displaymanager when OSD layer is removed --- BizHawk.Client.EmuHawk/DisplayManager/FilterManager.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BizHawk.Client.EmuHawk/DisplayManager/FilterManager.cs b/BizHawk.Client.EmuHawk/DisplayManager/FilterManager.cs index 67545cc5f2..5470110035 100644 --- a/BizHawk.Client.EmuHawk/DisplayManager/FilterManager.cs +++ b/BizHawk.Client.EmuHawk/DisplayManager/FilterManager.cs @@ -222,6 +222,14 @@ namespace BizHawk.Client.EmuHawk.FilterManager } //filter loop + //if the current output disposition is a texture, we need to render it + if (currState.SurfaceDisposition == SurfaceDisposition.Texture) + { + var renderer = new Render(); + Filters.Insert(Filters.Count, renderer); + goto RETRY; + } + //patch the program so that the final rendertarget set operation is the framebuffer instead for (int i = Program.Count - 1; i >= 0; i--) {