Add size mismatch error to drawBuffer

This commit is contained in:
Alessandro Proto 2023-02-10 14:13:44 +01:00
parent cf12454a83
commit 23d062682a

View file

@ -446,6 +446,11 @@ public class GPU : IPlugin
var w = (int)L.CheckInteger(4);
var h = (int)L.CheckInteger(5);
if(w * h != buffer.Length)
{
L.Error("width and height do not match buffer size");
}
_game.Drawing.DrawBuffer(buffer, new()
{
X = x,