Commits

Alex Szpakowski  committed 2b9107a

Renamed love.window.getModes to love.window.getFullscreenModes (resolves issue #679)

  • Participants
  • Parent commits 167473a

Comments (0)

Files changed (2)

File src/modules/window/wrap_Window.cpp

 	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<Window::WindowSize> modes = instance->getFullscreenSizes(displayindex - 1);
+	std::vector<Window::WindowSize> modes = instance->getFullscreenSizes(displayindex);
 
 	lua_createtable(L, modes.size(), 0);
 
 	{ "checkMode", w_checkMode },
 	{ "setMode", w_setMode },
 	{ "getMode", w_getMode },
-	{ "getModes", w_getModes },
+	{ "getFullscreenModes", w_getFullscreenModes },
 	{ "setFullscreen", w_setFullscreen },
 	{ "getFullscreen", w_getFullscreen },
 	{ "isCreated", w_isCreated },

File src/modules/window/wrap_Window.h

 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);