diff --git a/Core/HLE/proAdhoc.cpp b/Core/HLE/proAdhoc.cpp index 9fe9760b77..a7619de4a9 100644 --- a/Core/HLE/proAdhoc.cpp +++ b/Core/HLE/proAdhoc.cpp @@ -22,9 +22,7 @@ // All credit goes to him! #if !defined(_WIN32) -#include #include -#include #endif #include diff --git a/Core/HLE/sceNet.cpp b/Core/HLE/sceNet.cpp index ff9cca72dd..32e07afe1b 100644 --- a/Core/HLE/sceNet.cpp +++ b/Core/HLE/sceNet.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #endif #include "net/resolve.h" @@ -113,6 +112,9 @@ static uint8_t getInstanceNumber() { //hIDMapFile = NULL; return id; +#elif __ANDROID__ + // TODO : replace shm_open & shm_unlink with ashmem or android-shmem + return 1; #elif __linux__ || __APPLE__ long BUF_SIZE = 4096; //caddr_t pIDBuf; @@ -158,6 +160,13 @@ static void PPSSPPIDCleanup() { CloseHandle(hIDMapFile); // If program exited(or crashed?) or the last handle reference closed the shared memory object will be deleted. hIDMapFile = NULL; } +#elif __ANDROID__ + if (hIDMapFile != 0) { + close(hIDMapFile); + // TODO : replace shm_unlink with ashmem or android-shmem + //shm_unlink(ID_SHM_NAME); // If program exited or crashed before unlinked the shared memory object and it's contents will persist. + hIDMapFile = 0; + } #elif __linux__ || __APPLE__ // TODO : This unlink should be called when program exits instead of everytime the game reset. if (hIDMapFile != 0) {