Android: replace porting::getTotalSystemMemory
on SDL_GetSystemRAM
This commit is contained in:
parent
23a14cf674
commit
db11d3ec7b
@ -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
|
||||
|
@ -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;
|
||||
|
@ -73,11 +73,6 @@ int getInputDialogState();
|
||||
*/
|
||||
std::string getInputDialogValue();
|
||||
|
||||
/**
|
||||
* get total device memory
|
||||
*/
|
||||
float getTotalSystemMemory();
|
||||
|
||||
/**
|
||||
* notify java on server connection
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user