فهرست منبع

Lua bindings for getScreenInfo changes

mcc 14 سال پیش
والد
کامیت
ae45130a9c

+ 4 - 0
Bindings/Contents/LUA/API/Polycode/CoreServices.lua

@@ -184,6 +184,10 @@ function CoreServices:getConfig()
 	end
 end
 
+function CoreServices:getScreenInfo(width, height, hz)
+	local retVal = Polycore.CoreServices_getScreenInfo(self.__ptr, width.__ptr, height.__ptr, hz.__ptr)
+end
+
 
 
 function CoreServices:__delete()

+ 13 - 0
Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h

@@ -1770,6 +1770,19 @@ static int Polycore_CoreServices_getConfig(lua_State *L) {
 	return 1;
 }
 
+static int Polycore_CoreServices_getScreenInfo(lua_State *L) {
+	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
+	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
+	int * width = (int *)lua_topointer(L, 2);
+	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
+	int * height = (int *)lua_topointer(L, 3);
+	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
+	int * hz = (int *)lua_topointer(L, 4);
+	inst->getScreenInfo(width, height, hz);
+	return 0;
+}
+
 static int Polycore_delete_CoreServices(lua_State *L) {
 	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
 	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);

+ 1 - 0
Bindings/Contents/LUA/Source/PolycodeLUA.cpp

@@ -181,6 +181,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"CoreServices_getSoundManager", Polycore_CoreServices_getSoundManager},
 		{"CoreServices_getFontManager", Polycore_CoreServices_getFontManager},
 		{"CoreServices_getConfig", Polycore_CoreServices_getConfig},
+		{"CoreServices_getScreenInfo", Polycore_CoreServices_getScreenInfo},
 		{"delete_CoreServices", Polycore_delete_CoreServices},
 		{"Cubemap", Polycore_Cubemap},
 		{"delete_Cubemap", Polycore_delete_Cubemap},