mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Build: Remove IOS define.
This commit is contained in:
parent
13ec384dbe
commit
5119d79082
@ -23,7 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
#include <libkern/OSCacheControl.h>
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
@ -627,7 +627,7 @@ void ARMXEmitter::FlushIcache()
|
||||
|
||||
void ARMXEmitter::FlushIcacheSection(u8 *start, u8 *end)
|
||||
{
|
||||
#if defined(IOS)
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
// Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
|
||||
sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
|
||||
#elif PPSSPP_PLATFORM(WINDOWS)
|
||||
|
@ -63,9 +63,9 @@
|
||||
#include <CoreFoundation/CFString.h>
|
||||
#include <CoreFoundation/CFURL.h>
|
||||
#include <CoreFoundation/CFBundle.h>
|
||||
#if !defined(IOS)
|
||||
#if !PPSSPP_PLATFORM(IOS)
|
||||
#include <mach-o/dyld.h>
|
||||
#endif // !defined(IOS)
|
||||
#endif // !PPSSPP_PLATFORM(IOS)
|
||||
#endif // __APPLE__
|
||||
|
||||
#include "Common/Data/Encoding/Utf8.h"
|
||||
@ -844,13 +844,13 @@ const std::string &GetExeDirectory()
|
||||
ExePath = program_path;
|
||||
#endif
|
||||
|
||||
#elif (defined(__APPLE__) && !defined(IOS)) || defined(__linux__) || defined(KERN_PROC_PATHNAME)
|
||||
#elif (defined(__APPLE__) && !PPSSPP_PLATFORM(IOS)) || defined(__linux__) || defined(KERN_PROC_PATHNAME)
|
||||
char program_path[4096];
|
||||
uint32_t program_path_size = sizeof(program_path) - 1;
|
||||
|
||||
#if defined(__linux__)
|
||||
if (readlink("/proc/self/exe", program_path, program_path_size) > 0)
|
||||
#elif defined(__APPLE__) && !defined(IOS)
|
||||
#elif defined(__APPLE__) && !PPSSPP_PLATFORM(IOS)
|
||||
if (_NSGetExecutablePath(program_path, &program_path_size) == 0)
|
||||
#elif defined(KERN_PROC_PATHNAME)
|
||||
int mib[4] = {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
#include <OpenGLES/ES3/gl.h>
|
||||
#include <OpenGLES/ES3/glext.h>
|
||||
#elif defined(USING_GLES2)
|
||||
@ -58,7 +58,7 @@ typedef void (EGLAPIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (
|
||||
#endif
|
||||
extern PFNGLBLITFRAMEBUFFERNVPROC glBlitFramebufferNV;
|
||||
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
extern PFNGLDISCARDFRAMEBUFFEREXTPROC glDiscardFramebufferEXT;
|
||||
extern PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOES;
|
||||
extern PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOES;
|
||||
|
@ -31,7 +31,7 @@ PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOES;
|
||||
PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOES;
|
||||
PFNGLISVERTEXARRAYOESPROC glIsVertexArrayOES;
|
||||
#endif
|
||||
#ifndef IOS
|
||||
#if !PPSSPP_PLATFORM(IOS)
|
||||
#include "EGL/egl.h"
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "ppsspp_config.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "Common/GPU/OpenGL/GLCommon.h"
|
||||
@ -18,7 +19,7 @@
|
||||
|
||||
#define TEXCACHE_NAME_CACHE_SIZE 16
|
||||
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
extern void bindDefaultFBO();
|
||||
#endif
|
||||
|
||||
@ -201,7 +202,7 @@ void GLQueueRunner::RunInitSteps(const std::vector<GLRInitStep> &steps, bool ski
|
||||
} else if (gl_extensions.VersionGEThan(3, 3, 0)) {
|
||||
glBindFragDataLocation(program->program, 0, "fragColor0");
|
||||
}
|
||||
#elif !defined(IOS)
|
||||
#elif !PPSSPP_PLATFORM(IOS)
|
||||
if (gl_extensions.GLES3 && step.create_program.support_dual_source) {
|
||||
glBindFragDataLocationIndexedEXT(program->program, 0, 0, "fragColor0");
|
||||
glBindFragDataLocationIndexedEXT(program->program, 0, 1, "fragColor1");
|
||||
@ -1368,7 +1369,7 @@ void GLQueueRunner::PerformCopy(const GLRStep &step) {
|
||||
_dbg_assert_(dstTex);
|
||||
|
||||
#if defined(USING_GLES2)
|
||||
#ifndef IOS
|
||||
#if !PPSSPP_PLATFORM(IOS)
|
||||
_assert_msg_(gl_extensions.OES_copy_image || gl_extensions.NV_copy_image || gl_extensions.EXT_copy_image, "Image copy extension expected");
|
||||
glCopyImageSubDataOES(
|
||||
srcTex, target, srcLevel, srcRect.x, srcRect.y, srcZ,
|
||||
@ -1682,7 +1683,7 @@ void GLQueueRunner::fbo_unbind() {
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, g_defaultFBO);
|
||||
#endif
|
||||
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
bindDefaultFBO();
|
||||
#endif
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "ppsspp_config.h"
|
||||
#include "GLRenderManager.h"
|
||||
#include "Common/GPU/OpenGL/GLFeatures.h"
|
||||
#include "Common/GPU/thin3d.h"
|
||||
@ -889,7 +890,7 @@ void *GLRBuffer::Map(GLBufferStrategy strategy) {
|
||||
glBindBuffer(target_, buffer_);
|
||||
|
||||
if (gl_extensions.ARB_buffer_storage || gl_extensions.EXT_buffer_storage) {
|
||||
#ifndef IOS
|
||||
#if !PPSSPP_PLATFORM(IOS)
|
||||
if (!hasStorage_) {
|
||||
GLbitfield storageFlags = access & ~(GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_FLUSH_EXPLICIT_BIT);
|
||||
#ifdef USING_GLES2
|
||||
|
@ -382,7 +382,7 @@ GLboolean gl3stubInit() {
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
#endif // IOS
|
||||
#endif // PPSPP_PLATFORM(IOS)
|
||||
|
||||
#endif // GLES2
|
||||
|
||||
|
@ -514,7 +514,7 @@ extern GL_APICALL void (* GL_APIENTRY glBufferStorageEXT) (GLenum targ
|
||||
/* OES_copy_image, etc. */
|
||||
extern GL_APICALL void (* GL_APIENTRY glCopyImageSubDataOES) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
|
||||
#endif // IOS
|
||||
#endif // PPSSPP_PLATFORM(IOS)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ static const unsigned short blendFactorToGL[] = {
|
||||
GL_ONE_MINUS_SRC1_COLOR,
|
||||
GL_SRC1_ALPHA,
|
||||
GL_ONE_MINUS_SRC1_ALPHA,
|
||||
#elif !defined(IOS)
|
||||
#elif !PPSSPP_PLATFORM(IOS)
|
||||
GL_SRC1_COLOR_EXT,
|
||||
GL_ONE_MINUS_SRC1_COLOR_EXT,
|
||||
GL_SRC1_ALPHA_EXT,
|
||||
|
@ -238,7 +238,7 @@ static const char *device_name_blacklist[] = {
|
||||
|
||||
#ifndef _WIN32
|
||||
static const char *so_names[] = {
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
"@executable_path/Frameworks/libMoltenVK.dylib",
|
||||
#elif PPSSPP_PLATFORM(MAC)
|
||||
"@executable_path/../Frameworks/libMoltenVK.dylib",
|
||||
|
@ -84,7 +84,7 @@ void MemArena::ReleaseView(void* view, size_t size) {
|
||||
}
|
||||
|
||||
bool MemArena::NeedsProbing() {
|
||||
#if defined(IOS) && PPSSPP_ARCH(64BIT)
|
||||
#if PPSSPP_PLATFORM(IOS) && PPSSPP_ARCH(64BIT)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
@ -92,7 +92,7 @@ bool MemArena::NeedsProbing() {
|
||||
}
|
||||
|
||||
u8* MemArena::Find4GBBase() {
|
||||
#if defined(IOS) && PPSSPP_ARCH(64BIT)
|
||||
#if PPSSPP_PLATFORM(IOS) && PPSSPP_ARCH(64BIT)
|
||||
// The caller will need to do probing, like on 32-bit Windows.
|
||||
return nullptr;
|
||||
#else
|
||||
|
@ -279,7 +279,7 @@ void FreeAlignedMemory(void* ptr) {
|
||||
bool PlatformIsWXExclusive() {
|
||||
// Needed on platforms that disable W^X pages for security. Even without block linking, still should be much faster than IR JIT.
|
||||
// This might also come in useful for UWP (Universal Windows Platform) if I'm understanding things correctly.
|
||||
#if defined(IOS) || PPSSPP_PLATFORM(UWP) || defined(__OpenBSD__)
|
||||
#if PPSSPP_PLATFORM(IOS) || PPSSPP_PLATFORM(UWP) || defined(__OpenBSD__)
|
||||
return true;
|
||||
#elif PPSSPP_PLATFORM(MAC) && PPSSPP_ARCH(ARM64)
|
||||
return true;
|
||||
|
@ -213,7 +213,7 @@ void ArmJit::GenerateFixedCode() {
|
||||
// IDEA - we have 26 bits, why not just use offsets from base of code?
|
||||
// Another idea: Shift the bloc number left by two in the op, this would let us do
|
||||
// LDR(R0, R9, R0); here, replacing the next instructions.
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
// On iOS, R9 (JITBASEREG) is volatile. We have to reload it.
|
||||
MOVI2R(JITBASEREG, (u32)(uintptr_t)GetBasePtr());
|
||||
#endif
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
@ -760,7 +761,7 @@ namespace MIPSAnalyst {
|
||||
std::lock_guard<std::recursive_mutex> guard(functions_lock);
|
||||
hashToFunction.clear();
|
||||
// Really need to detect C++11 features with better defines.
|
||||
#if !defined(IOS)
|
||||
#if !PPSSPP_PLATFORM(IOS)
|
||||
hashToFunction.reserve(functions.size());
|
||||
#endif
|
||||
for (auto iter = functions.begin(); iter != functions.end(); iter++) {
|
||||
|
@ -129,7 +129,7 @@ inline static bool CanIgnoreView(const MemoryView &view) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(IOS) && PPSSPP_ARCH(64BIT)
|
||||
#if PPSSPP_PLATFORM(IOS) && PPSSPP_ARCH(64BIT)
|
||||
#define SKIP(a_flags, b_flags) \
|
||||
if ((b_flags) & MV_KERNEL) \
|
||||
continue;
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include <deque>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
@ -301,7 +302,7 @@ namespace Reporting
|
||||
return "Windows ARM32";
|
||||
#elif defined(_WIN32)
|
||||
return "Windows";
|
||||
#elif defined(IOS)
|
||||
#elif PPSSPP_PLATFORM(IOS)
|
||||
return "iOS";
|
||||
#elif defined(__APPLE__)
|
||||
return "Mac";
|
||||
|
@ -41,7 +41,7 @@ u32 QuickTexHashNEON(const void *checkp, u32 size) {
|
||||
__builtin_prefetch(checkp, 0, 0);
|
||||
|
||||
if (((intptr_t)checkp & 0xf) == 0 && (size & 0x3f) == 0) {
|
||||
#if defined(IOS) || PPSSPP_ARCH(ARM64) || defined(_MSC_VER) || !PPSSPP_ARCH(ARMV7)
|
||||
#if PPSSPP_PLATFORM(IOS) || PPSSPP_ARCH(ARM64) || defined(_MSC_VER) || !PPSSPP_ARCH(ARMV7)
|
||||
uint32x4_t cursor = vdupq_n_u32(0);
|
||||
uint16x8_t cursor2 = vld1q_u16(QuickTexHashInitial);
|
||||
uint16x8_t update = vdupq_n_u16(0x2455U);
|
||||
|
@ -19,7 +19,7 @@
|
||||
// Alpha/stencil is a convoluted mess. Some good comments are here:
|
||||
// https://github.com/hrydgard/ppsspp/issues/3768
|
||||
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include "StateMappingGLES.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
#include "Common/GPU/OpenGL/GLDebugLog.h"
|
||||
@ -58,7 +58,7 @@ static const GLushort glBlendFactorLookup[(size_t)BlendFactor::COUNT] = {
|
||||
GL_ONE_MINUS_SRC1_COLOR,
|
||||
GL_SRC1_ALPHA,
|
||||
GL_ONE_MINUS_SRC1_ALPHA,
|
||||
#elif !defined(IOS)
|
||||
#elif !PPSSPP_PLATFORM(IOS)
|
||||
GL_SRC1_COLOR_EXT,
|
||||
GL_ONE_MINUS_SRC1_COLOR_EXT,
|
||||
GL_SRC1_ALPHA_EXT,
|
||||
|
@ -133,7 +133,7 @@ Atlas g_ui_atlas;
|
||||
#include "../../android/jni/Arm64EmitterTest.h"
|
||||
#endif
|
||||
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
#include "ios/iOSCoreAudio.h"
|
||||
#elif defined(__APPLE__)
|
||||
#include <mach-o/dyld.h>
|
||||
@ -211,13 +211,13 @@ static LogListener *logger = nullptr;
|
||||
std::string boot_filename = "";
|
||||
|
||||
void NativeHost::InitSound() {
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
iOSCoreAudioInit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void NativeHost::ShutdownSound() {
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
iOSCoreAudioShutdown();
|
||||
#endif
|
||||
}
|
||||
@ -323,7 +323,7 @@ static void PostLoadConfig() {
|
||||
if (g_Config.currentDirectory.empty()) {
|
||||
#if defined(__ANDROID__)
|
||||
g_Config.currentDirectory = g_Config.externalDirectory;
|
||||
#elif defined(IOS)
|
||||
#elif PPSSPP_PLATFORM(IOS)
|
||||
g_Config.currentDirectory = g_Config.internalDataDirectory;
|
||||
#elif PPSSPP_PLATFORM(SWITCH)
|
||||
g_Config.currentDirectory = "/";
|
||||
@ -454,12 +454,12 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
||||
std::string user_data_path = savegame_dir;
|
||||
pendingMessages.clear();
|
||||
pendingInputBoxes.clear();
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
user_data_path += "/";
|
||||
#endif
|
||||
|
||||
// We want this to be FIRST.
|
||||
#if defined(IOS)
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
// Packed assets are included in app
|
||||
VFSRegister("", new DirectoryAssetReader(external_dir));
|
||||
#endif
|
||||
@ -508,7 +508,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
||||
g_Config.memStickDirectory = memstickDir + "/";
|
||||
}
|
||||
}
|
||||
#elif defined(IOS)
|
||||
#elif PPSSPP_PLATFORM(IOS)
|
||||
g_Config.memStickDirectory = user_data_path;
|
||||
g_Config.flash0Directory = std::string(external_dir) + "/flash0/";
|
||||
#elif PPSSPP_PLATFORM(SWITCH)
|
||||
|
@ -59,7 +59,7 @@ static std::string TrimNewlines(const std::string &s) {
|
||||
}
|
||||
|
||||
bool TestsAvailable() {
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
std::string testDirectory = g_Config.flash0Directory + "../";
|
||||
#else
|
||||
std::string testDirectory = g_Config.memStickDirectory;
|
||||
@ -74,7 +74,7 @@ bool TestsAvailable() {
|
||||
bool RunTests() {
|
||||
std::string output;
|
||||
|
||||
#ifdef IOS
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
std::string baseDirectory = g_Config.flash0Directory + "../";
|
||||
#else
|
||||
std::string baseDirectory = g_Config.memStickDirectory;
|
||||
|
@ -19,8 +19,9 @@
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include <cstddef> //size_t
|
||||
#if defined(IOS)
|
||||
#if PPSSPP_PLATFORM(IOS)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <cstdint> //uint32_t
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/ConfigValues.h"
|
||||
@ -17,7 +17,7 @@ bool LibretroGLCoreContext::Init() {
|
||||
|
||||
void LibretroGLCoreContext::CreateDrawContext() {
|
||||
if (!glewInitDone) {
|
||||
#if !defined(IOS) && !defined(USING_GLES2)
|
||||
#if !PPSSPP_PLATFORM(IOS) && !defined(USING_GLES2)
|
||||
if (glewInit() != GLEW_OK) {
|
||||
ERROR_LOG(G3D, "glewInit() failed.\n");
|
||||
return;
|
||||
|
@ -147,7 +147,6 @@ else ifneq (,$(findstring osx,$(platform)))
|
||||
# iOS
|
||||
else ifneq (,$(findstring ios,$(platform)))
|
||||
TARGET := $(TARGET_NAME)_libretro_ios.dylib
|
||||
PLATCFLAGS += -DIOS
|
||||
LDFLAGS += -dynamiclib -marm
|
||||
fpic = -fPIC
|
||||
GLES = 1
|
||||
@ -171,7 +170,7 @@ else ifneq (,$(findstring ios,$(platform)))
|
||||
CXX += -miphoneos-version-min=5.0
|
||||
PLATCFLAGS += -miphoneos-version-min=5.0
|
||||
endif
|
||||
PLATCFLAGS += -DIOS -DHAVE_POSIX_MEMALIGN
|
||||
PLATCFLAGS += -DHAVE_POSIX_MEMALIGN
|
||||
CPUFLAGS += -DARMv5_ONLY -DARM
|
||||
PLATFORM_EXT := unix
|
||||
TARGET_ARCH = arm
|
||||
|
@ -91,16 +91,8 @@
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
#define PPSSPP_PLATFORM_IOS 1
|
||||
#define PPSSPP_PLATFORM_IOS_SIMULATOR 1
|
||||
//TODO: Remove this compat define
|
||||
#ifndef IOS
|
||||
#define IOS 1
|
||||
#endif
|
||||
#elif TARGET_OS_IPHONE
|
||||
#define PPSSPP_PLATFORM_IOS 1
|
||||
//TODO: Remove this compat define
|
||||
#ifndef IOS
|
||||
#define IOS 1
|
||||
#endif
|
||||
#elif TARGET_OS_MAC
|
||||
#define PPSSPP_PLATFORM_MAC 1
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user