diff options
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r-- | apps/plugins/lua/rocklib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 46572014f0..ddd4081371 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c | |||
@@ -433,6 +433,11 @@ RB_WRAP(font_getstringsize) | |||
433 | int fontnumber = luaL_checkint(L, 2); | 433 | int fontnumber = luaL_checkint(L, 2); |
434 | int w, h; | 434 | int w, h; |
435 | 435 | ||
436 | if (fontnumber == FONT_UI) | ||
437 | fontnumber = rb->global_status->font_id[SCREEN_MAIN]; | ||
438 | else | ||
439 | fontnumber = FONT_SYSFIXED; | ||
440 | |||
436 | int result = rb->font_getstringsize(str, &w, &h, fontnumber); | 441 | int result = rb->font_getstringsize(str, &w, &h, fontnumber); |
437 | lua_pushinteger(L, result); | 442 | lua_pushinteger(L, result); |
438 | lua_pushinteger(L, w); | 443 | lua_pushinteger(L, w); |