[Memory] Android memory mapping

This commit is contained in:
Triang3l
2020-11-22 16:32:46 +03:00
parent ec507dc2f6
commit 9ef7fb62d3
3 changed files with 144 additions and 1 deletions

View File

@@ -0,0 +1,44 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2020 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_BASE_PLATFORM_ANDROID_H_
#define XENIA_BASE_PLATFORM_ANDROID_H_
// NOTE: if you're including this file it means you are explicitly depending
// on Android-specific headers. This is bad for portability and should be
// avoided!
#include <android/native_activity.h>
#include <cstddef>
#include <cstdint>
namespace xe {
namespace platform {
namespace android {
// Must be called in onCreate of the first activity.
void Initialize(const ANativeActivity* activity);
// Returns the device API level - if not initialized, will return the minimum
// level supported by Xenia.
int32_t api_level();
// Android API functions added after the minimum supported API version.
struct ApiFunctions {
struct {
int (*ASharedMemory_create)(const char* name, size_t size);
} api_26;
};
const ApiFunctions& api_functions();
} // namespace android
} // namespace platform
} // namespace xe
#endif // XENIA_BASE_PLATFORM_ANDROID_H_