From 75340f6c7bff5a2c1a1c3ea1060af0166100e603 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 29 Aug 2013 21:42:05 -0300 Subject: [PATCH] Renamed love.window.getModes to love.window.getFullscreenModes (resolves issue #679) --- src/modules/window/wrap_Window.cpp | 8 ++++---- src/modules/window/wrap_Window.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/window/wrap_Window.cpp b/src/modules/window/wrap_Window.cpp index 52d551914..8ffa30dd7 100644 --- a/src/modules/window/wrap_Window.cpp +++ b/src/modules/window/wrap_Window.cpp @@ -164,11 +164,11 @@ int w_getMode(lua_State *L) return 3; } -int w_getModes(lua_State *L) +int w_getFullscreenModes(lua_State *L) { - int displayindex = luaL_optint(L, 1, 1); + int displayindex = luaL_optint(L, 1, 1) - 1; - std::vector modes = instance->getFullscreenSizes(displayindex - 1); + std::vector modes = instance->getFullscreenSizes(displayindex); lua_createtable(L, modes.size(), 0); @@ -319,7 +319,7 @@ static const luaL_Reg functions[] = { "checkMode", w_checkMode }, { "setMode", w_setMode }, { "getMode", w_getMode }, - { "getModes", w_getModes }, + { "getFullscreenModes", w_getFullscreenModes }, { "setFullscreen", w_setFullscreen }, { "getFullscreen", w_getFullscreen }, { "isCreated", w_isCreated }, diff --git a/src/modules/window/wrap_Window.h b/src/modules/window/wrap_Window.h index 5b215eca1..dfd4cc036 100644 --- a/src/modules/window/wrap_Window.h +++ b/src/modules/window/wrap_Window.h @@ -33,7 +33,7 @@ int w_getDisplayCount(lua_State *L); int w_checkMode(lua_State *L); int w_setMode(lua_State *L); int w_getMode(lua_State *L); -int w_getModes(lua_State *L); +int w_getFullscreenModes(lua_State *L); int w_setFullscreen(lua_State *L); int w_getFullscreen(lua_State *L); int w_isCreated(lua_State *L);