diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index d19039d4d..7305161d5 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -548,7 +548,7 @@ void set_default_settings() // Set the optimal settings depending on the memory size [Android] | model [iOS] #ifdef __ANDROID__ - float memoryMax = porting::getTotalSystemMemory(); + float memoryMax = SDL_GetSystemRAM() / 1024; if (memoryMax < 2) { // minimal settings for less than 2GB RAM diff --git a/src/porting_android.cpp b/src/porting_android.cpp index 9e9c5b408..37187d58f 100644 --- a/src/porting_android.cpp +++ b/src/porting_android.cpp @@ -280,14 +280,6 @@ std::string getInputDialogValue() return readJavaString((jstring) result); } -float getTotalSystemMemory() -{ - long pages = sysconf(_SC_PHYS_PAGES); - long page_size = sysconf(_SC_PAGE_SIZE); - int divisor = 1024 * 1024 * 1024; - return (float) (pages * page_size) / (float) divisor; -} - bool hasRealKeyboard() { return device_has_keyboard; diff --git a/src/porting_android.h b/src/porting_android.h index e970e6f97..39fb0dc92 100644 --- a/src/porting_android.h +++ b/src/porting_android.h @@ -73,11 +73,6 @@ int getInputDialogState(); */ std::string getInputDialogValue(); -/** - * get total device memory - */ -float getTotalSystemMemory(); - /** * notify java on server connection */