mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #2547 from raven02/patch-2
Add multiple new options in UI
This commit is contained in:
commit
5156f12fbc
1 changed files with 106 additions and 26 deletions
|
@ -818,6 +818,7 @@ void GraphicsScreenP1::render() {
|
|||
bool Vsync = g_Config.iVSyncInterval != 0;
|
||||
UICheckBox(GEN_ID, x, y += stride, gs->T("VSync"), ALIGN_TOPLEFT, &Vsync);
|
||||
g_Config.iVSyncInterval = Vsync ? 1 : 0;
|
||||
UICheckBox(GEN_ID, x, y += stride, gs->T("Fullscreen"), ALIGN_TOPLEFT, &g_Config.bFullScreen);
|
||||
#endif
|
||||
UICheckBox(GEN_ID, x, y += stride, gs->T("Display Raw Framebuffer"), ALIGN_TOPLEFT, &g_Config.bDisplayFramebuffer);
|
||||
if (UICheckBox(GEN_ID, x, y += stride, gs->T("Buffered Rendering"), ALIGN_TOPLEFT, &g_Config.bBufferedRendering)) {
|
||||
|
@ -825,7 +826,13 @@ void GraphicsScreenP1::render() {
|
|||
gpu->Resized();
|
||||
}
|
||||
if (g_Config.bBufferedRendering) {
|
||||
if (UICheckBox(GEN_ID, x + 60, y += stride, gs->T("AA", "Anti Aliasing"), ALIGN_TOPLEFT, &g_Config.SSAntiAliasing)) {
|
||||
bool memory = !g_Config.bFramebuffersToMem;
|
||||
if (UICheckBox(GEN_ID, x + 60, y += stride, gs->T("Skip updating PSP Memory"), ALIGN_TOPLEFT, &memory)) {
|
||||
if (gpu)
|
||||
gpu->Resized();
|
||||
}
|
||||
g_Config.bFramebuffersToMem = memory ? 0 : 1;
|
||||
if (UICheckBox(GEN_ID, x + 60, y += stride, gs->T("AA", "Anti-aliasing"), ALIGN_TOPLEFT, &g_Config.SSAntiAliasing)) {
|
||||
if (gpu)
|
||||
gpu->Resized();
|
||||
}
|
||||
|
@ -1234,27 +1241,45 @@ void SystemScreen::render() {
|
|||
UICheckBox(GEN_ID, x, y += stride, s->T("Fast Memory", "Fast Memory (unstable)"), ALIGN_TOPLEFT, &g_Config.bFastMemory);
|
||||
|
||||
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(g_Config.iLockedCPUSpeed <= 0)
|
||||
g_Config.iLockedCPUSpeed = 222;
|
||||
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);
|
||||
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;
|
||||
|
||||
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;
|
||||
switch (g_Config.iButtonPreference) {
|
||||
case PSP_SYSTEMPARAM_BUTTON_CIRCLE:
|
||||
buttonPreferenceTitle = s->T("Button Preference - O to Confirm");
|
||||
buttonPreferenceTitle = s->T("Button Pref : O to Confirm");
|
||||
break;
|
||||
case PSP_SYSTEMPARAM_BUTTON_CROSS:
|
||||
default:
|
||||
buttonPreferenceTitle = s->T("Button Preference - X to Confirm");
|
||||
buttonPreferenceTitle = s->T("Button Pref : X to Confirm");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1263,15 +1288,55 @@ void SystemScreen::render() {
|
|||
#else
|
||||
const int checkboxH = 48;
|
||||
#endif
|
||||
ui_draw2d.DrawTextShadow(UBUNTU24, buttonPreferenceTitle, x + UI_SPACE + 29, (y += stride) + checkboxH / 2, 0xFFFFFFFF, ALIGN_LEFT | ALIGN_VCENTER);
|
||||
y += stride;
|
||||
ui_draw2d.DrawTextShadow(UBUNTU24, buttonPreferenceTitle, x, (y += stride) + checkboxH / 2, 0xFFFFFFFF, ALIGN_LEFT | ALIGN_VCENTER);
|
||||
// 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))
|
||||
g_Config.iButtonPreference = PSP_SYSTEMPARAM_BUTTON_CIRCLE;
|
||||
if (UIButton(GEN_ID, hlinearButtonPref, 90, 0, s->T("Use X"), ALIGN_LEFT))
|
||||
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 ;
|
||||
|
@ -1323,20 +1388,6 @@ void SystemScreen::render() {
|
|||
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();
|
||||
}
|
||||
|
@ -1365,7 +1416,36 @@ void ControlsScreen::render() {
|
|||
UICheckBox(GEN_ID, x, y += stride, c->T("OnScreen", "On-Screen Touch Controls"), ALIGN_TOPLEFT, &g_Config.bShowTouchControls);
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Tilt", "Tilt to Analog (horizontal)"), ALIGN_TOPLEFT, &g_Config.bAccelerometerToAnalogHoriz);
|
||||
if (g_Config.bShowTouchControls) {
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Show Analog Stick"), ALIGN_TOPLEFT, &g_Config.bShowAnalogStick);
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Show Left Analog Stick"), ALIGN_TOPLEFT, &g_Config.bShowAnalogStick);
|
||||
bool rightstick = g_Config.iRightStickBind > 0;
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Bind Right Analog Stick"), ALIGN_TOPLEFT, &rightstick);
|
||||
if (rightstick) {
|
||||
if (g_Config.iRightStickBind <= 0 )
|
||||
g_Config.iRightStickBind = 1;
|
||||
|
||||
char showType[256];
|
||||
std::string type;
|
||||
switch (g_Config.iRightStickBind) {
|
||||
case 1: type = "Arrow Buttons";break;
|
||||
case 2: type = "Face Buttons";break;
|
||||
case 3: type = "L/R";break;
|
||||
case 4: type = "L/R + Triangle/Cross";break;
|
||||
}
|
||||
sprintf(showType, "%s %s", c->T("Target :"), type.c_str());
|
||||
ui_draw2d.DrawText(UBUNTU24, showType, x + 60, (y += stride) , 0xFFFFFFFF, ALIGN_LEFT);
|
||||
HLinear hlinear1(x + 60 , y+= stride + 5, 10);
|
||||
if (UIButton(GEN_ID, hlinear1, 200, 0, c->T("Arrow Buttons"), ALIGN_LEFT))
|
||||
g_Config.iRightStickBind = 1;
|
||||
if (UIButton(GEN_ID, hlinear1, 200, 0, c->T("Face Buttons"), ALIGN_LEFT))
|
||||
g_Config.iRightStickBind = 2;
|
||||
if (UIButton(GEN_ID, hlinear1, 60, 0, c->T("L/R"), ALIGN_LEFT))
|
||||
g_Config.iRightStickBind = 3;
|
||||
if (UIButton(GEN_ID, hlinear1, 280, 0, c->T("L/R + Triangle/Cross"), ALIGN_LEFT))
|
||||
g_Config.iRightStickBind = 4;
|
||||
y += 20;
|
||||
} else
|
||||
g_Config.iRightStickBind = 0;
|
||||
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Buttons Scaling"), ALIGN_TOPLEFT, &g_Config.bLargeControls);
|
||||
if (g_Config.bLargeControls) {
|
||||
char scale[256];
|
||||
|
|
Loading…
Add table
Reference in a new issue