mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-03 11:15:20 +02:00
Expose SYSPROP_SYSTEMVERSION to Libretro Android core. This fixes crashes with targetSdk 29.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user