diff --git a/sdcard/3ds/ctruLua/example.lua b/sdcard/3ds/ctruLua/example.lua index 8ab85b6..13298ce 100644 --- a/sdcard/3ds/ctruLua/example.lua +++ b/sdcard/3ds/ctruLua/example.lua @@ -8,7 +8,7 @@ local dMul = 1 local angle = 0 -local texture1 = gfx.texture.load("sdmc:/3ds/ctruLua/icon.png", gfx.texture.PLACE_RAM, gfx.texture.TYPE_PNG); +local texture1 = gfx.texture.load("sdmc:/3ds/ctruLua/icon.png"); if not texture1 then error("Giants ducks came from another planet") end gfx.color.setBackground(gfx.color.RGBA8(200, 200, 200)) diff --git a/source/texture.c b/source/texture.c index e856f08..bed00d2 100644 --- a/source/texture.c +++ b/source/texture.c @@ -16,7 +16,7 @@ u8 getType(const char *name) { // module functions static int texture_load(lua_State *L) { const char *path = luaL_checkstring(L, 1); - u8 place = luaL_checkinteger(L, 2); + u8 place = luaL_optinteger(L, 2, 0); //place in ram by default u8 type = luaL_optinteger(L, 3, 3); //type 3 is "search at the end of the filename" texture_userdata *texture;