Don't allow 0 width/height rectangle to be used with GDI+'s buffered graphics

This commit is contained in:
CasualPokePlayer 2024-08-25 22:09:10 -07:00
parent f9883f6700
commit 0a9c2dc276
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,8 @@ namespace BizHawk.Bizware.Graphics
ControlGraphics?.Dispose();
BufferedGraphics?.Dispose();
(ControlGraphics, var r) = _getControlRenderContext();
r.Width = Math.Min(1, r.Width);
r.Height = Math.Min(1, r.Height);
BufferedGraphics = _bufferedGraphicsContext.Allocate(ControlGraphics, r);
}
}