summaryrefslogtreecommitdiffstats
path: root/Android/jni/app-android.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-22 14:19:27 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-22 14:19:27 +0100
commit94ca07cfbfe0016d70963c055c87fe14f8622a4d (patch)
tree28dc91dc948287f802d9628a2ea715e1d4e0be49 /Android/jni/app-android.cpp
parentChunk is now warnings clean (diff)
parentUpdate GETTING-STARTED.md (diff)
downloadcuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.gz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.bz2
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.lz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.xz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.zst
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.zip
Diffstat (limited to 'Android/jni/app-android.cpp')
-rw-r--r--Android/jni/app-android.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Android/jni/app-android.cpp b/Android/jni/app-android.cpp
index 197df29c4..386f1b90e 100644
--- a/Android/jni/app-android.cpp
+++ b/Android/jni/app-android.cpp
@@ -11,7 +11,7 @@
#include <assert.h>
#include "OSSupport/CriticalSection.h"
-#include "OSSupport/MakeDir.h"
+#include "OSSupport/File.h"
#include "ToJava.h"
#include "Root.h"
@@ -84,7 +84,7 @@ extern "C" void Java_com_mcserver_MCServerActivity_NativeOnCreate( JNIEnv* env,
//__android_log_print(ANDROID_LOG_ERROR,"MCServer", "%s", "Logging from C++!");
g_CriticalSection.Unlock();
- mkdir("/sdcard/mcserver", S_IRWXU | S_IRWXG | S_IRWXO);
+ cFile::CreateFolder("/sdcard/mcserver");
pRoot = new cRoot();
pRoot->Start();
@@ -105,7 +105,7 @@ extern "C" void Java_com_mcserver_MCServerActivity_NativeCleanUp( JNIEnv* env,
__android_log_print(ANDROID_LOG_ERROR,"MCServer", "pRoot: %p", pRoot);
if( pRoot != NULL )
{
- pRoot->ExecuteConsoleCommand("stop");
+ pRoot->QueueExecuteConsoleCommand("stop");
}
}
@@ -124,7 +124,7 @@ extern "C" jint Java_com_mcserver_MCServerActivity_NativeGetWebAdminPort( JNIEnv
{
if( pRoot != NULL && pRoot->GetWebAdmin() != NULL )
{
- return pRoot->GetWebAdmin()->GetPort();
+ return atoi(pRoot->GetWebAdmin()->GetIPv4Ports().c_str());
}
return 0;
-} \ No newline at end of file
+}