Alex Szpakowski avatar Alex Szpakowski committed 2b9107a

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

Comments (0)

Files changed (2)

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 },

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);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.