dont blow up when a core reporting 0x0 virtualsize is auto-loaded. not the most graceful solution, but it works

This commit is contained in:
zeromus 2017-08-22 18:34:45 -04:00
parent 097d20adf2
commit fb697840d0
1 changed files with 7 additions and 0 deletions

View File

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