Lua - apply CrazyTB's patch to fix gui.drawImageRegion()

This commit is contained in:
adelikat 2015-03-24 22:15:36 +00:00
parent 16e9bc7d38
commit b74e0a3b3d
1 changed files with 2 additions and 10 deletions

View File

@ -359,17 +359,9 @@ namespace BizHawk.Client.EmuHawk
ImageCache.Add(path, img);
}
var pts = new Point[]
{
new Point(dest_x, dest_y ),
new Point(dest_x + (dest_width ?? img.Width), dest_y),
new Point(dest_x + (dest_width ?? source_width), dest_y + (dest_height ?? source_height))
};
var dest_rect = new Rectangle(dest_x, dest_y, (dest_width ?? source_width), (dest_height ?? source_height));
var rect = new Rectangle(source_x, source_y, source_width, source_height);
g.DrawImage(img, pts, rect, GraphicsUnit.Pixel);
g.DrawImage(img, dest_rect, source_x, source_y, source_width, source_height, GraphicsUnit.Pixel);
}
}