1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00

Added ctr.gfx.getFPS, renamed ctr.hid.read to ctr.hid.keys, unload font from memory when exiting and did some cleaning

This commit is contained in:
Reuh 2015-08-19 17:14:02 +02:00
parent bea69d4e30
commit b772a42d28
8 changed files with 42 additions and 19 deletions

View file

@ -13,11 +13,15 @@ static const struct luaL_Reg font_lib[] = {
int luaopen_font_lib(lua_State *L) {
luaL_newlib(L, font_lib);
font_default = sftd_load_font_mem(vera_ttf, vera_ttf_size); // Load default font
return 1;
}
void load_font_lib(lua_State *L) {
font_default = sftd_load_font_mem(vera_ttf, vera_ttf_size); // Load default font
luaL_requiref(L, "ctr.gfx.font", luaopen_font_lib, false);
}
void unload_font_lib() {
sftd_free_font(font_default); // Unload current font
}