Disable vertex jit on jailed iOS devices

This commit is contained in:
W.MS/王京 2013-12-02 03:28:20 +08:00 committed by Henrik Rydgård
parent 366d892c46
commit 6d4095abdf
4 changed files with 13 additions and 10 deletions

View File

@ -41,7 +41,7 @@ http::Downloader g_DownloadManager;
Config g_Config;
#ifdef IOS
extern bool isJailed;
extern bool iosCanUseJit;
#endif
Config::Config() { }
@ -131,7 +131,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
IniFile::Section *cpu = iniFile.GetOrCreateSection("CPU");
#ifdef IOS
cpu->Get("Jit", &bJit, !isJailed);
cpu->Get("Jit", &bJit, iosCanUseJit);
#else
cpu->Get("Jit", &bJit, true);
#endif
@ -179,8 +179,12 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
iAnisotropyLevel = 4;
}
graphics->Get("VertexCache", &bVertexCache, true);
#ifdef IOS
graphics->Get("VertexDecJit", &bVertexDecoderJit, iosCanUseJit);
#else
graphics->Get("VertexDecJit", &bVertexDecoderJit, true);
#endif
#ifdef _WIN32
graphics->Get("FullScreen", &bFullScreen, false);
#endif

View File

@ -48,7 +48,7 @@ namespace MainWindow {
}
#endif
#ifdef IOS
extern bool isJailed;
extern bool iosCanUseJit;
#endif
static const int alternateSpeedTable[9] = {
@ -507,7 +507,7 @@ void DeveloperToolsScreen::CreateViews() {
list->Add(new ItemHeader(s->T("General")));
#ifdef IOS
if (isJailed) {
if (!iosCanUseJit) {
list->Add(new TextView(s->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)")));
} else {
list->Add(new CheckBox(&g_Config.bJit, s->T("Dynarec", "Dynarec (JIT)")));

View File

@ -100,7 +100,7 @@ std::string config_filename;
std::string game_title;
#ifdef IOS
bool isJailed;
bool iosCanUseJit;
#endif
// Really need to clean this mess of globals up... but instead I add more :P

View File

@ -33,7 +33,7 @@ extern ScreenManager *screenManager;
InputState input_state;
extern std::string ram_temp_file;
extern bool isJailed;
extern bool iosCanUseJit;
ViewController* sharedViewController;
@ -70,8 +70,7 @@ ViewController* sharedViewController;
ram_temp_file = [[NSTemporaryDirectory() stringByAppendingPathComponent:@"ram_tmp.file"] fileSystemRepresentation];
NativeInit(0, NULL, [self.documentsPath UTF8String], [self.bundlePath UTF8String], NULL);
isJailed = true;
iosCanUseJit = false;
NSArray *jailPath = [NSArray arrayWithObjects:
@"/Applications/Cydia.app",
@ -83,7 +82,7 @@ ViewController* sharedViewController;
for(NSString *string in jailPath)
{
if ([[NSFileManager defaultManager] fileExistsAtPath:string])
isJailed = false;
iosCanUseJit = true;
}
iCadeToKeyMap[iCadeJoystickUp] = NKCODE_DPAD_UP;