mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Toggle to unlock CPU speed
This commit is contained in:
parent
ea1f9e268e
commit
f525ea07eb
1 changed files with 68 additions and 24 deletions
|
@ -1241,27 +1241,45 @@ void SystemScreen::render() {
|
||||||
UICheckBox(GEN_ID, x, y += stride, s->T("Fast Memory", "Fast Memory (unstable)"), ALIGN_TOPLEFT, &g_Config.bFastMemory);
|
UICheckBox(GEN_ID, x, y += stride, s->T("Fast Memory", "Fast Memory (unstable)"), ALIGN_TOPLEFT, &g_Config.bFastMemory);
|
||||||
|
|
||||||
bool LockCPUSpeed = g_Config.iLockedCPUSpeed != 0;
|
bool LockCPUSpeed = g_Config.iLockedCPUSpeed != 0;
|
||||||
UICheckBox(GEN_ID, x, y += stride, s->T("Lock PSP CPU Speed"), ALIGN_TOPLEFT, &LockCPUSpeed);
|
UICheckBox(GEN_ID, x, y += stride, s->T("Unlock CPU Speed"), ALIGN_TOPLEFT, &LockCPUSpeed);
|
||||||
if(LockCPUSpeed) {
|
if(LockCPUSpeed) {
|
||||||
if(g_Config.iLockedCPUSpeed <= 0)
|
if(g_Config.iLockedCPUSpeed <= 0)
|
||||||
g_Config.iLockedCPUSpeed = 222;
|
g_Config.iLockedCPUSpeed = 222;
|
||||||
char showCPUSpeed[256];
|
char showCPUSpeed[256];
|
||||||
sprintf(showCPUSpeed, "%s %d", s->T("Locked CPU Speed:"), g_Config.iLockedCPUSpeed);
|
sprintf(showCPUSpeed, "%s %d", s->T("Clock: "), g_Config.iLockedCPUSpeed);
|
||||||
ui_draw2d.DrawText(UBUNTU24, showCPUSpeed, x + 60, (y += stride) - 5, 0xFFFFFFFF, ALIGN_LEFT);
|
ui_draw2d.DrawText(UBUNTU24, showCPUSpeed, x + 60, (y += stride) - 5, 0xFFFFFFFF, ALIGN_LEFT);
|
||||||
|
HLinear hlinear1(x + 250, y, 20);
|
||||||
|
if (UIButton(GEN_ID, hlinear1, 80, 0, s->T("Auto"), ALIGN_LEFT))
|
||||||
|
g_Config.iLockedCPUSpeed = 333;
|
||||||
|
if (UIButton(GEN_ID, hlinear1, 40, 0, s->T("-"), ALIGN_LEFT))
|
||||||
|
if (g_Config.iLockedCPUSpeed > 111)
|
||||||
|
g_Config.iLockedCPUSpeed -= 111;
|
||||||
|
if (UIButton(GEN_ID, hlinear1, 40, 0, s->T("+"), ALIGN_LEFT))
|
||||||
|
if (g_Config.iLockedCPUSpeed < 666)
|
||||||
|
g_Config.iLockedCPUSpeed += 111;
|
||||||
|
y += 20;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
g_Config.iLockedCPUSpeed = 0;
|
g_Config.iLockedCPUSpeed = 0;
|
||||||
|
|
||||||
|
UICheckBox(GEN_ID, x, y += stride, s->T("Enable Cheats"), ALIGN_TOPLEFT, &g_Config.bEnableCheats);
|
||||||
|
if (g_Config.bEnableCheats) {
|
||||||
|
HLinear hlinear1(x + 60, y += stride + 10, 20);
|
||||||
|
if (UIButton(GEN_ID, hlinear1, LARGE_BUTTON_WIDTH + 50, 0, s->T("Reload Cheats"), ALIGN_TOPLEFT))
|
||||||
|
g_Config.bReloadCheats = true;
|
||||||
|
y += 10;
|
||||||
}
|
}
|
||||||
//UICheckBox(GEN_ID, x, y += stride, s->T("Daylight Savings"), ALIGN_TOPLEFT, &g_Config.bDayLightSavings);
|
|
||||||
|
y += 20;
|
||||||
|
|
||||||
const char *buttonPreferenceTitle;
|
const char *buttonPreferenceTitle;
|
||||||
switch (g_Config.iButtonPreference) {
|
switch (g_Config.iButtonPreference) {
|
||||||
case PSP_SYSTEMPARAM_BUTTON_CIRCLE:
|
case PSP_SYSTEMPARAM_BUTTON_CIRCLE:
|
||||||
buttonPreferenceTitle = s->T("Button Preference - O to Confirm");
|
buttonPreferenceTitle = s->T("Button Pref : O to Confirm");
|
||||||
break;
|
break;
|
||||||
case PSP_SYSTEMPARAM_BUTTON_CROSS:
|
case PSP_SYSTEMPARAM_BUTTON_CROSS:
|
||||||
default:
|
default:
|
||||||
buttonPreferenceTitle = s->T("Button Preference - X to Confirm");
|
buttonPreferenceTitle = s->T("Button Pref : X to Confirm");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1270,15 +1288,55 @@ void SystemScreen::render() {
|
||||||
#else
|
#else
|
||||||
const int checkboxH = 48;
|
const int checkboxH = 48;
|
||||||
#endif
|
#endif
|
||||||
ui_draw2d.DrawTextShadow(UBUNTU24, buttonPreferenceTitle, x + UI_SPACE + 29, (y += stride) + checkboxH / 2, 0xFFFFFFFF, ALIGN_LEFT | ALIGN_VCENTER);
|
ui_draw2d.DrawTextShadow(UBUNTU24, buttonPreferenceTitle, x, (y += stride) + checkboxH / 2, 0xFFFFFFFF, ALIGN_LEFT | ALIGN_VCENTER);
|
||||||
y += stride;
|
|
||||||
// 29 is the width of the checkbox, new UI will replace.
|
// 29 is the width of the checkbox, new UI will replace.
|
||||||
HLinear hlinearButtonPref(x + UI_SPACE + 29, y, 20);
|
HLinear hlinearButtonPref(x + 400, y, 20);
|
||||||
if (UIButton(GEN_ID, hlinearButtonPref, 90, 0, s->T("Use O"), ALIGN_LEFT))
|
if (UIButton(GEN_ID, hlinearButtonPref, 90, 0, s->T("Use O"), ALIGN_LEFT))
|
||||||
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CIRCLE;
|
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CIRCLE;
|
||||||
if (UIButton(GEN_ID, hlinearButtonPref, 90, 0, s->T("Use X"), ALIGN_LEFT))
|
if (UIButton(GEN_ID, hlinearButtonPref, 90, 0, s->T("Use X"), ALIGN_LEFT))
|
||||||
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CROSS;
|
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CROSS;
|
||||||
y += 20 + 6;
|
|
||||||
|
y += 20;
|
||||||
|
|
||||||
|
char recents[256];
|
||||||
|
sprintf(recents, "%s %i", s->T("Max. No of Recents :"), g_Config.iMaxRecent);
|
||||||
|
ui_draw2d.DrawText(UBUNTU24, recents, x, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
|
||||||
|
HLinear hlinear2(x + 400, y, 20);
|
||||||
|
if (UIButton(GEN_ID, hlinear2, 50, 0, s->T("-1"), ALIGN_LEFT))
|
||||||
|
if (g_Config.iMaxRecent > 4)
|
||||||
|
g_Config.iMaxRecent -= 1;
|
||||||
|
if (UIButton(GEN_ID, hlinear2, 50, 0, s->T("+1"), ALIGN_LEFT))
|
||||||
|
if (g_Config.iMaxRecent < 40)
|
||||||
|
g_Config.iMaxRecent += 1;
|
||||||
|
if (UIButton(GEN_ID, hlinear2, 80, 0, s->T("Clear"), ALIGN_LEFT)) {
|
||||||
|
g_Config.recentIsos.clear();
|
||||||
|
}
|
||||||
|
y += 20;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
char lang[256];
|
||||||
|
std::string type;
|
||||||
|
switch (g_Config.ilanguage) {
|
||||||
|
case 0: type = "日本語";break;
|
||||||
|
case 1: type = "English";break;
|
||||||
|
case 2: type = "Français";break;
|
||||||
|
case 3: type = "Castellano";break;
|
||||||
|
case 4: type = "Deutsch";break;
|
||||||
|
case 5: type = "Italiano";break;
|
||||||
|
case 6: type = "Nederlands";break;
|
||||||
|
case 7: type = "Português";break;
|
||||||
|
case 8: type = "한국어";break;
|
||||||
|
case 9: type = "Русский";break;
|
||||||
|
case 10: type = "繁體中文";break;
|
||||||
|
case 11: type = "简体中文";break;
|
||||||
|
}
|
||||||
|
sprintf(lang, "%s %s", s->T("System Language :"), type.c_str());
|
||||||
|
ui_draw2d.DrawText(UBUNTU24, lang, x, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
|
||||||
|
HLinear hlinear3(x + 400, y, 20);
|
||||||
|
if (UIButton(GEN_ID, hlinear3, LARGE_BUTTON_WIDTH, 0, s->T("Language"), ALIGN_TOPLEFT)) {
|
||||||
|
screenManager()->push(new LanguageScreen());
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bool time = g_Config.iTimeFormat > 0 ;
|
bool time = g_Config.iTimeFormat > 0 ;
|
||||||
|
@ -1330,20 +1388,6 @@ void SystemScreen::render() {
|
||||||
g_Config.iDateFormat = 0;
|
g_Config.iDateFormat = 0;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ANDROID
|
|
||||||
UICheckBox(GEN_ID, x, y += stride, s->T("Enable Cheats"), ALIGN_TOPLEFT, &g_Config.bEnableCheats);
|
|
||||||
if (g_Config.bEnableCheats) {
|
|
||||||
HLinear hlinear1(x + 60, y += stride + 10, 20);
|
|
||||||
if (UIButton(GEN_ID, hlinear1, LARGE_BUTTON_WIDTH + 50, 0, s->T("Reload Cheats"), ALIGN_TOPLEFT))
|
|
||||||
g_Config.bReloadCheats = true;
|
|
||||||
y += 10;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
HLinear hlinear2(x, y += stride + 10, 20);
|
|
||||||
|
|
||||||
if (UIButton(GEN_ID, hlinear2, LARGE_BUTTON_WIDTH, 0, s->T("Language"), ALIGN_TOPLEFT)) {
|
|
||||||
screenManager()->push(new LanguageScreen());
|
|
||||||
}
|
|
||||||
|
|
||||||
UIEnd();
|
UIEnd();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue