Kaynağa Gözat

Prevent use of system call also on iOS. Closes #2083.

Lasse Öörni 8 yıl önce
ebeveyn
işleme
3a85655248

+ 2 - 2
Source/ThirdParty/Lua/src/loslib.c

@@ -36,8 +36,8 @@ static int os_pushresult (lua_State *L, int i, const char *filename) {
 
 
 
 
 static int os_execute (lua_State *L) {
 static int os_execute (lua_State *L) {
-// Urho3D - tvOS port, system not available for AppleTVOS and also its simulator
-#ifdef TVOS
+// Urho3D - tvOS port, system not available for AppleTVOS and also its simulator, also soon for iOS
+#if defined(TVOS) || defined(IOS)
   lua_pushinteger(L, -1);
   lua_pushinteger(L, -1);
 #else
 #else
   lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));
   lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));

+ 1 - 1
Source/Urho3D/IO/FileSystem.cpp

@@ -85,7 +85,7 @@ namespace Urho3D
 
 
 int DoSystemCommand(const String& commandLine, bool redirectToLog, Context* context)
 int DoSystemCommand(const String& commandLine, bool redirectToLog, Context* context)
 {
 {
-#ifdef TVOS
+#if defined(TVOS) || defined(IOS)
     return -1;
     return -1;
 #else
 #else
 #if !defined(__EMSCRIPTEN__) && !defined(MINI_URHO)
 #if !defined(__EMSCRIPTEN__) && !defined(MINI_URHO)