From d22d268c92d90671e159ead7582ff0a4c7b4d7a3 Mon Sep 17 00:00:00 2001 From: "bart@bartbes.ath.cx" Date: Sun, 11 Oct 2009 16:23:33 +0200 Subject: [PATCH] Fixed some constants --- configure.in | 2 +- src/modules/filesystem/File.cpp | 2 +- src/modules/graphics/opengl/wrap_Graphics.cpp | 15 +++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 63a962a4a..9f903e8ad 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -AC_INIT([love], [20090906-6a275e4b909a]) +AC_INIT([love], [20091011-ae1750d78436]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([platform/unix]) AC_CONFIG_MACRO_DIR([platform/unix/m4]) diff --git a/src/modules/filesystem/File.cpp b/src/modules/filesystem/File.cpp index 3ac26e365..6a152b1f1 100644 --- a/src/modules/filesystem/File.cpp +++ b/src/modules/filesystem/File.cpp @@ -43,7 +43,7 @@ namespace filesystem {"c", File::CLOSED}, {"r", File::READ}, {"w", File::WRITE}, - {"w+", File::APPEND}, + {"a", File::APPEND}, }; StringMap File::modes(File::modeEntries, sizeof(File::modeEntries)); diff --git a/src/modules/graphics/opengl/wrap_Graphics.cpp b/src/modules/graphics/opengl/wrap_Graphics.cpp index 376e4a9ce..d581e7405 100644 --- a/src/modules/graphics/opengl/wrap_Graphics.cpp +++ b/src/modules/graphics/opengl/wrap_Graphics.cpp @@ -383,8 +383,8 @@ namespace opengl int w_getBlendMode(lua_State * L) { Graphics::BlendMode mode = instance->getBlendMode(); - const char * str = luaL_checkstring(L, 1); - if(!Graphics::getConstant(str, mode)) + const char * str; + if(!Graphics::getConstant(mode, str)) return luaL_error(L, "Invalid blend mode: %s", str); lua_pushstring(L, str); @@ -394,9 +394,9 @@ namespace opengl int w_getColorMode(lua_State * L) { Graphics::ColorMode mode = instance->getColorMode(); - const char * str = luaL_checkstring(L, 1); - if(!Graphics::getConstant(str, mode)) - return luaL_error(L, "Invalid blend mode: %s", str); + const char * str; + if(!Graphics::getConstant(mode, str)) + return luaL_error(L, "Invalid color mode: %s", str); lua_pushstring(L, str); return 1; @@ -459,7 +459,10 @@ namespace opengl int w_getLineStyle(lua_State * L) { - lua_pushinteger(L, instance->getLineStyle()); + Graphics::LineStyle style = instance->getLineStyle(); + const char *str; + Graphics::getConstant(style, str); + lua_pushstring(L, str); return 1; }