@@ -1559,6 +1559,8 @@ ADE_FUNC(getStringWidth, l_Graphics, "string String", "Gets string width", "numb
15591559 if (!ade_get_args (L, " s" , &s))
15601560 return ade_set_error (L, " i" , 0 );
15611561
1562+ LuaScreenContext context;
1563+
15621564 int w;
15631565 gr_get_string_size (&w, nullptr , s);
15641566
@@ -1574,6 +1576,8 @@ ADE_FUNC(getStringHeight, l_Graphics, "string String", "Gets string height", "nu
15741576 if (!ade_get_args (L, " s" , &s))
15751577 return ade_set_error (L, " i" , 0 );
15761578
1579+ LuaScreenContext context;
1580+
15771581 int h;
15781582 gr_get_string_size (nullptr , &h, s);
15791583
@@ -1589,6 +1593,8 @@ ADE_FUNC(getStringSize, l_Graphics, "string String", "Gets string width and heig
15891593 if (!ade_get_args (L, " s" , &s))
15901594 return ade_set_error (L, " ii" , 0 , 0 );
15911595
1596+ LuaScreenContext context;
1597+
15921598 int w, h;
15931599 gr_get_string_size (&w, &h, s);
15941600
@@ -1708,6 +1714,8 @@ ADE_FUNC(drawImage,
17081714 if (!Gr_inited)
17091715 return ade_set_error (L, " b" , false );
17101716
1717+ LuaScreenContext context;
1718+
17111719 int idx;
17121720 int x1 = 0 ;
17131721 int y1 = 0 ;
@@ -1798,6 +1806,8 @@ ADE_FUNC(drawImageCentered,
17981806 if (!Gr_inited)
17991807 return ade_set_error (L, " b" , false );
18001808
1809+ LuaScreenContext context;
1810+
18011811 int idx;
18021812 int x = 0 ;
18031813 int y = 0 ;
@@ -1889,6 +1899,8 @@ ADE_FUNC_DEPRECATED(drawMonochromeImage,
18891899 if (!Gr_inited)
18901900 return ade_set_error (L, " b" , false );
18911901
1902+ LuaScreenContext context;
1903+
18921904 int idx;
18931905 int x,y;
18941906 int x2=INT_MAX ;
0 commit comments