I stumbled across an issue in BizHawk (2.3.1). Whenever I use 'gui.drawPolygon' I have to leave both the line and background colors null in order to get the shape to even appear on screen. Whenever I attempt to draw any other shape, both color parameters are accepted without issue. I can use 'gui.defaultBackground' and 'gui.defaultForeground' to successfully set the color for a polygon as a work-around, at the moment.
Am I mucking something up or is this just a bug?
local poly_square_a = { {5,5},{5,10},{10,10},{10,5} }
local poly_square_b = { {5,15},{5,20},{10,20},{10,15} }
gui.defaultBackground(0xFFA55900)
gui.defaultForeground(0xFFA55900)
while true do
-- Shape Will Appear Using Defaults
gui.drawPolygon(poly_square_a)
-- Shape Will Not Appear
gui.drawPolygon(poly_square_b, 0xFF086110, 0xFF005908)
-- Shape Will Appear
gui.drawBox(5, 25, 10, 30, 0xFF524131, 0xFF312821)
-- Shape Will Appear
gui.drawEllipse(5, 35, 5, 5, 0xFF6B0294, 0xFFDED3EF)
emu.frameadvance()
end