From fb697840d077055e198a62b012d4c114f656c752 Mon Sep 17 00:00:00 2001 From: zeromus Date: Tue, 22 Aug 2017 18:34:45 -0400 Subject: [PATCH] dont blow up when a core reporting 0x0 virtualsize is auto-loaded. not the most graceful solution, but it works --- BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs b/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs index 7266aaab82..110d8201e5 100644 --- a/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs +++ b/BizHawk.Client.EmuHawk/DisplayManager/DisplayManager.cs @@ -586,6 +586,13 @@ namespace BizHawk.Client.EmuHawk }; var filterProgram = UpdateSourceInternal(job); + //this only happens when we're forcing the client to size itself with autoload and the core says 0x0.... + //we need some other more sensible client size. + if (filterProgram == null) + { + return new Size(256, 192); + } + var size = filterProgram.Filters[filterProgram.Filters.Count - 1].FindOutput().SurfaceFormat.Size; return size;