mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
iOS: Nix iosCanUseJit and targetIsJailbroken. Move NativeInit call to main so it can take cmd line args.
This commit is contained in:
parent
3e5833843a
commit
20794081ea
@ -55,11 +55,6 @@ static const char *logSectionName = "LogDebug";
|
||||
static const char *logSectionName = "Log";
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef IOS
|
||||
extern bool iosCanUseJit;
|
||||
#endif
|
||||
|
||||
struct ConfigSetting {
|
||||
enum Type {
|
||||
TYPE_TERMINATOR,
|
||||
@ -314,11 +309,8 @@ static int DefaultNumWorkers() {
|
||||
return cpu_info.num_cores;
|
||||
}
|
||||
|
||||
// TODO: Default to IRJit on iOS when it's done.
|
||||
static int DefaultCpuCore() {
|
||||
#ifdef IOS
|
||||
return (int)(iosCanUseJit ? CPUCore::JIT : CPUCore::INTERPRETER);
|
||||
#elif defined(ARM) || defined(ARM64) || defined(_M_IX86) || defined(_M_X64)
|
||||
#if defined(ARM) || defined(ARM64) || defined(_M_IX86) || defined(_M_X64)
|
||||
return (int)CPUCore::JIT;
|
||||
#else
|
||||
return (int)CPUCore::INTERPRETER;
|
||||
@ -326,9 +318,7 @@ static int DefaultCpuCore() {
|
||||
}
|
||||
|
||||
static bool DefaultCodeGen() {
|
||||
#ifdef IOS
|
||||
return iosCanUseJit ? true : false;
|
||||
#elif defined(ARM) || defined(ARM64) || defined(_M_IX86) || defined(_M_X64)
|
||||
#if defined(ARM) || defined(ARM64) || defined(_M_IX86) || defined(_M_X64)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
@ -67,11 +67,6 @@
|
||||
#include "gfx/gl_common.h"
|
||||
#endif
|
||||
|
||||
#ifdef IOS
|
||||
extern bool iosCanUseJit;
|
||||
extern bool targetIsJailbroken;
|
||||
#endif
|
||||
|
||||
extern bool VulkanMayBeAvailable();
|
||||
|
||||
GameSettingsScreen::GameSettingsScreen(std::string gamePath, std::string gameID, bool editThenRestore)
|
||||
|
@ -130,11 +130,6 @@ std::string config_filename;
|
||||
|
||||
bool g_graphicsInited;
|
||||
|
||||
#ifdef IOS
|
||||
bool iosCanUseJit;
|
||||
bool targetIsJailbroken;
|
||||
#endif
|
||||
|
||||
// Really need to clean this mess of globals up... but instead I add more :P
|
||||
bool g_TakeScreenshot;
|
||||
static bool isOuya;
|
||||
|
@ -62,9 +62,6 @@ bool simulateAnalog = false;
|
||||
|
||||
extern ScreenManager *screenManager;
|
||||
|
||||
extern bool iosCanUseJit;
|
||||
extern bool targetIsJailbroken;
|
||||
|
||||
__unsafe_unretained static ViewController* sharedViewController;
|
||||
static GraphicsContext *graphicsContext;
|
||||
|
||||
@ -98,26 +95,6 @@ static GraphicsContext *graphicsContext;
|
||||
if (self) {
|
||||
sharedViewController = self;
|
||||
self.touches = [NSMutableArray array];
|
||||
self.documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
|
||||
self.bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/assets/"];
|
||||
|
||||
iosCanUseJit = true;
|
||||
targetIsJailbroken = false;
|
||||
NSArray *jailPath = [NSArray arrayWithObjects:
|
||||
@"/Applications/Cydia.app",
|
||||
@"/private/var/lib/apt",
|
||||
@"/private/var/stash",
|
||||
@"/usr/sbin/sshd",
|
||||
@"/usr/bin/sshd", nil];
|
||||
|
||||
for (NSString *string in jailPath) {
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:string]) {
|
||||
// checking device jailbreak status in order to determine which message to show in GameSettingsScreen
|
||||
targetIsJailbroken = true;
|
||||
}
|
||||
}
|
||||
|
||||
NativeInit(0, NULL, [self.documentsPath UTF8String], [self.bundlePath UTF8String], NULL);
|
||||
|
||||
iCadeToKeyMap[iCadeJoystickUp] = NKCODE_DPAD_UP;
|
||||
iCadeToKeyMap[iCadeJoystickRight] = NKCODE_DPAD_RIGHT;
|
||||
|
@ -112,7 +112,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
// Simulates a debugger. Makes it possible to use JIT (though only W^X)
|
||||
syscall(SYS_ptrace, 0 /*PTRACE_TRACEME*/, 0, 0, 0);
|
||||
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, NSStringFromClass([PPSSPPUIApplication class]), NSStringFromClass([AppDelegate class]));
|
||||
NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
|
||||
NSString *bundlePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/assets/"];
|
||||
|
||||
NativeInit(argc, (const char**)argv, documentsPath.UTF8String, bundlePath.UTF8String, NULL);
|
||||
|
||||
return UIApplicationMain(argc, argv, NSStringFromClass([PPSSPPUIApplication class]), NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user