mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 14:15:41 +12:00
android pls
This commit is contained in:
parent
a576467a84
commit
ec13e1ccfb
1 changed files with 6 additions and 13 deletions
19
third_party/host_memory/host_memory.cpp
vendored
19
third_party/host_memory/host_memory.cpp
vendored
|
@ -5,10 +5,6 @@
|
|||
#define ARCHITECTURE_arm64
|
||||
#endif
|
||||
|
||||
#ifndef __ANDROID__
|
||||
#define USING_FD
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
|
@ -38,15 +34,12 @@
|
|||
#define MAP_NORESERVE 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef USING_FD
|
||||
#define MAYBE_ANONYMOUS(flags) (flags)
|
||||
#else
|
||||
#define MAYBE_ANONYMOUS(flags) (flags) | MAP_ANONYMOUS
|
||||
#endif
|
||||
|
||||
#endif // ^^^ Linux ^^^
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/sharedmem.h>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
#include <random>
|
||||
|
@ -448,10 +441,10 @@ namespace Common {
|
|||
#if defined(__FreeBSD__) && __FreeBSD__ < 13
|
||||
// XXX Drop after FreeBSD 12.* reaches EOL on 2024-06-30
|
||||
fd = shm_open(SHM_ANON, O_RDWR, 0600);
|
||||
#elif defined(USING_FD)
|
||||
#elif defined(__ANDROID__)
|
||||
fd = memfd_create("HostMemory", 0);
|
||||
#else
|
||||
fd = -1;
|
||||
fd = ASharedMemory_create("HostMemory", 0);
|
||||
#endif
|
||||
|
||||
#ifdef USING_FD
|
||||
|
|
Loading…
Add table
Reference in a new issue