Expose SYSPROP_SYSTEMVERSION to Libretro Android core. This fixes crashes with targetSdk 29.
This commit is contained in:
parent
9f7839c96a
commit
cbdb9cc5dc
1 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "base/timeutil.h"
|
||||
#include "Common/ChunkFile.h"
|
||||
|
@ -32,6 +33,10 @@
|
|||
#include "libretro/libretro.h"
|
||||
#include "libretro/LibretroGraphicsContext.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
#include <sys/system_properties.h>
|
||||
#endif
|
||||
|
||||
#define DIR_SEP "/"
|
||||
#ifdef _WIN32
|
||||
#define DIR_SEP_CHRS "/\\"
|
||||
|
@ -857,6 +862,15 @@ int System_GetPropertyInt(SystemProperty prop)
|
|||
{
|
||||
case SYSPROP_AUDIO_SAMPLE_RATE:
|
||||
return SAMPLERATE;
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
case SYSPROP_SYSTEMVERSION: {
|
||||
char sdk[PROP_VALUE_MAX] = {0};
|
||||
if (__system_property_get("ro.build.version.sdk", sdk) != 0) {
|
||||
return atoi(sdk);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue