1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-17 13:25:20 +03:00

Fix lcd.drawRectangle on Horus (#3485)

* Fix lcd.drawRectangle on Horus

* Fix lcd.drawRectangle on Horus, this time not breaking other platforms

* Fix lcd.drawRectangle on Horus, this time *realy ?* not breaking other platforms

* Fix lcd.drawRectangle on Horus, default thickness to 1

* Fix lcd.drawRectangle on Horus, move to unsigned, following projectkk2glider comment

* Fix lcd.drawRectangle on Horus, spelling

* Fix lcd.drawRectangle on Horus, indent (hope I did understand your comment correctly
This commit is contained in:
3djc 2016-05-12 22:08:30 +02:00 committed by Bertrand Songis
parent 49b3e5428f
commit 0ec122f519

View file

@ -367,6 +367,8 @@ Draw a rectangle from top left corner (x,y) of specified width and height
@param flags (unsigned number) drawing flags
@param t (number) thickness in pixels
@status current Introduced in 2.0.0
*/
static int luaLcdDrawRectangle(lua_State *L)
@ -377,7 +379,12 @@ static int luaLcdDrawRectangle(lua_State *L)
int w = luaL_checkinteger(L, 3);
int h = luaL_checkinteger(L, 4);
unsigned int flags = luaL_optunsigned(L, 5, 0);
#if defined(PCBHORUS)
int t = luaL_optunsigned(L, 6, 1);
lcdDrawRect(x, y, w, h, t, 0xff, flags);
#else
lcdDrawRect(x, y, w, h, 0xff, flags);
#endif
return 0;
}