1
0

Android: replace porting::getTotalSystemMemory on SDL_GetSystemRAM

This commit is contained in:
Maksym H 2023-09-26 15:02:39 +03:00 committed by mckaygerhard
parent 23a14cf674
commit db11d3ec7b
3 changed files with 1 additions and 14 deletions

View File

@ -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

View File

@ -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;

View File

@ -73,11 +73,6 @@ int getInputDialogState();
*/
std::string getInputDialogValue();
/**
* get total device memory
*/
float getTotalSystemMemory();
/**
* notify java on server connection
*/