Skip to content

Commit

Permalink
Load texture in RAM by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Reuh committed Aug 22, 2015
1 parent 604247f commit 8da0e47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdcard/3ds/ctruLua/example.lua
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion source/texture.c
Expand Up @@ -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;
Expand Down

0 comments on commit 8da0e47

Please sign in to comment.