mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-29 13:18:36 +01:00
Toggle to adjust VPS/FPS/Both , new timeFormat/dateFormat/buttonPerference
This commit is contained in:
1 parent
45775d4fc2
commit
de4d970ab6
10 files changed
+168
-52
No files matched your search
+103
-16
@@ -465,8 +465,6 @@ void PauseScreen::render() {
|
||||
if (gpu)
|
||||
gpu->Resized();
|
||||
}
|
||||
UICheckBox(GEN_ID, x, y += stride, ss->T("Show FPS"), ALIGN_TOPLEFT, &g_Config.bShowFPSCounter);
|
||||
|
||||
bool enableFrameSkip = g_Config.iFrameSkip != 0;
|
||||
UICheckBox(GEN_ID, x, y += stride , gs->T("Frame Skipping"), ALIGN_TOPLEFT, &enableFrameSkip);
|
||||
if (enableFrameSkip) {
|
||||
@@ -686,24 +684,24 @@ void DeveloperScreen::render() {
|
||||
screenManager()->finishDialog(this, DR_OK);
|
||||
}
|
||||
|
||||
if (UIButton(GEN_ID, vlinear, w, 0, d->T("Load language ini"), ALIGN_LEFT)) {
|
||||
if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH + 80, 0, d->T("Load language ini"), ALIGN_LEFT)) {
|
||||
i18nrepo.LoadIni(g_Config.languageIni);
|
||||
// After this, g and s are no longer valid. Need to reload them.
|
||||
g = GetI18NCategory("General");
|
||||
d = GetI18NCategory("Developer");
|
||||
}
|
||||
|
||||
if (UIButton(GEN_ID, vlinear, w, 0, d->T("Save language ini"), ALIGN_LEFT)) {
|
||||
if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH + 80, 0, d->T("Save language ini"), ALIGN_LEFT)) {
|
||||
i18nrepo.SaveIni(g_Config.languageIni);
|
||||
}
|
||||
|
||||
if (UIButton(GEN_ID, vlinear, w, 0, d->T("Run CPU tests"), ALIGN_LEFT)) {
|
||||
if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH + 80, 0, d->T("Run CPU Tests"), ALIGN_LEFT)) {
|
||||
// TODO: Run tests
|
||||
RunTests();
|
||||
// screenManager()->push(new EmuScreen())
|
||||
}
|
||||
|
||||
if (UIButton(GEN_ID, vlinear, w, 0, d->T("Dump frame to log"), ALIGN_LEFT)) {
|
||||
if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH + 80, 0, d->T("Dump next frame"), ALIGN_LEFT)) {
|
||||
gpu->DumpNextFrame();
|
||||
}
|
||||
|
||||
@@ -928,7 +926,35 @@ void GraphicsScreenP3::render() {
|
||||
int y = 35;
|
||||
int stride = 40;
|
||||
int columnw = 400;
|
||||
|
||||
bool ShowCounter = g_Config.iShowFPSCounter > 0;
|
||||
UICheckBox(GEN_ID, x, y += stride, gs->T("Show VPS/FPS"), ALIGN_TOPLEFT, &ShowCounter);
|
||||
if (ShowCounter) {
|
||||
if (g_Config.iShowFPSCounter <= 0)
|
||||
g_Config.iShowFPSCounter = 1;
|
||||
|
||||
char counter[256];
|
||||
std::string type;
|
||||
|
||||
switch (g_Config.iShowFPSCounter) {
|
||||
case 1: type = "VPS";break;
|
||||
case 2: type = "FPS";break;
|
||||
case 3: type = "Both";break;
|
||||
}
|
||||
sprintf(counter, "%s %s", gs->T("Format :"), type.c_str());
|
||||
ui_draw2d.DrawText(UBUNTU24, counter, x + 60, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
|
||||
HLinear hlinear1(x + 250, y, 20);
|
||||
if (UIButton(GEN_ID, hlinear1, 80, 0, gs->T("VPS"), ALIGN_LEFT))
|
||||
g_Config.iShowFPSCounter = 1;
|
||||
if (UIButton(GEN_ID, hlinear1, 80, 0, gs->T("FPS"), ALIGN_LEFT))
|
||||
g_Config.iShowFPSCounter = 2;
|
||||
if (UIButton(GEN_ID, hlinear1, 90, 0, gs->T("Both"), ALIGN_LEFT))
|
||||
g_Config.iShowFPSCounter = 3;
|
||||
|
||||
y += 20;
|
||||
} else
|
||||
g_Config.iShowFPSCounter = 0;
|
||||
|
||||
bool FpsLimit = g_Config.iFpsLimit != 0;
|
||||
UICheckBox(GEN_ID, x, y += stride, gs->T("FPS Limit"), ALIGN_TOPLEFT, &FpsLimit);
|
||||
if (FpsLimit) {
|
||||
@@ -1122,13 +1148,74 @@ void SystemScreen::render() {
|
||||
#endif
|
||||
if (g_Config.bJit)
|
||||
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("Show FPS"), ALIGN_TOPLEFT, &g_Config.bShowFPSCounter);
|
||||
UICheckBox(GEN_ID, x, y += stride, s->T("Encrypt Save"), ALIGN_TOPLEFT, &g_Config.bEncryptSave);
|
||||
UICheckBox(GEN_ID, x, y += stride, s->T("Use Button X to Confirm"), ALIGN_TOPLEFT, &g_Config.bButtonPreference);
|
||||
bool tf = g_Config.itimeformat == 1;
|
||||
if (UICheckBox(GEN_ID, x, y += stride, s->T("12HR Time Format"), ALIGN_TOPLEFT, &tf)) {
|
||||
g_Config.itimeformat = tf ? 1 : 0;
|
||||
|
||||
UICheckBox(GEN_ID, x, y += stride, s->T("Daylight Savings"), ALIGN_TOPLEFT, &g_Config.bDayLightSavings);
|
||||
UICheckBox(GEN_ID, x, y += stride, s->T("Button Perference"), ALIGN_TOPLEFT, &g_Config.bButtonPreference);
|
||||
if (g_Config.bButtonPreference) {
|
||||
char button[256];
|
||||
std::string type;
|
||||
switch (g_Config.iButtonPreference) {
|
||||
case 0: type = "O to Enter";break;
|
||||
case 1: type = "X to Enter";break;
|
||||
}
|
||||
sprintf(button, "%s %s", s->T("Type :"), type.c_str());
|
||||
ui_draw2d.DrawText(UBUNTU24, button, x + 60, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
|
||||
HLinear hlinear1(x + 280, y, 20);
|
||||
if (UIButton(GEN_ID, hlinear1, 90, 0, s->T("Use O"), ALIGN_LEFT))
|
||||
g_Config.iButtonPreference = 0;
|
||||
if (UIButton(GEN_ID, hlinear1, 90, 0, s->T("Use X"), ALIGN_LEFT))
|
||||
g_Config.iButtonPreference = 1;
|
||||
y += 10;
|
||||
}
|
||||
|
||||
bool time = g_Config.iTimeFormat > 0 ;
|
||||
UICheckBox(GEN_ID, x, y += stride, s->T("Time Format"), ALIGN_TOPLEFT, &time);
|
||||
if (time) {
|
||||
if (g_Config.iTimeFormat <= 0)
|
||||
g_Config.iTimeFormat = 1;
|
||||
|
||||
char button[256];
|
||||
std::string type;
|
||||
switch (g_Config.iTimeFormat) {
|
||||
case 1: type = "12HR";break;
|
||||
case 2: type = "24HR";break;
|
||||
}
|
||||
sprintf(button, "%s %s", s->T("Format :"), type.c_str());
|
||||
ui_draw2d.DrawText(UBUNTU24, button, x + 60, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
|
||||
HLinear hlinear1(x + 280, y, 20);
|
||||
if (UIButton(GEN_ID, hlinear1, 80, 0, s->T("12HR"), ALIGN_LEFT))
|
||||
g_Config.iTimeFormat = 1;
|
||||
if (UIButton(GEN_ID, hlinear1, 80, 0, s->T("24HR"), ALIGN_LEFT))
|
||||
g_Config.iTimeFormat = 2;
|
||||
y += 10;
|
||||
} else
|
||||
g_Config.iTimeFormat = 0 ;
|
||||
|
||||
bool date = g_Config.iDateFormat > 0;
|
||||
UICheckBox(GEN_ID, x, y += stride, s->T("Date Format"), ALIGN_TOPLEFT, &date);
|
||||
if (date) {
|
||||
if (g_Config.iDateFormat <= 0)
|
||||
g_Config.iDateFormat = 1;
|
||||
char button[256];
|
||||
std::string type;
|
||||
switch (g_Config.iDateFormat) {
|
||||
case 1: type = "YYYYMMDD";break;
|
||||
case 2: type = "MMDDYYYY";break;
|
||||
case 3: type = "DDMMYYYY";break;
|
||||
}
|
||||
sprintf(button, "%s %s", s->T("Format :"), type.c_str());
|
||||
ui_draw2d.DrawText(UBUNTU24, button, x + 60, y += stride , 0xFFFFFFFF, ALIGN_LEFT);
|
||||
HLinear hlinear1(x + 350, y, 10);
|
||||
if (UIButton(GEN_ID, hlinear1, 70, 0, s->T("YMD"), ALIGN_LEFT))
|
||||
g_Config.iDateFormat = 1;
|
||||
if (UIButton(GEN_ID, hlinear1, 70, 0, s->T("MDY"), ALIGN_LEFT))
|
||||
g_Config.iDateFormat = 2;
|
||||
if (UIButton(GEN_ID, hlinear1, 70, 0, s->T("DMY"), ALIGN_LEFT))
|
||||
g_Config.iDateFormat = 3;
|
||||
y += 10;
|
||||
} else
|
||||
g_Config.iDateFormat = 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);
|
||||
@@ -1139,7 +1226,7 @@ void SystemScreen::render() {
|
||||
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();
|
||||
}
|
||||
@@ -1166,6 +1253,8 @@ void ControlsScreen::render() {
|
||||
int columnw = 440;
|
||||
|
||||
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("Show Analog Stick"), ALIGN_TOPLEFT, &g_Config.bShowAnalogStick);
|
||||
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("Buttons Scaling"), ALIGN_TOPLEFT, &g_Config.bLargeControls);
|
||||
if (g_Config.bLargeControls) {
|
||||
@@ -1183,11 +1272,10 @@ void ControlsScreen::render() {
|
||||
g_Config.fButtonScale += 0.1;
|
||||
y += 20;
|
||||
}
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Show Analog Stick"), ALIGN_TOPLEFT, &g_Config.bShowAnalogStick);
|
||||
// This will be a slider in the new UI later
|
||||
bool bTransparent = g_Config.iTouchButtonOpacity < 65;
|
||||
bool prev = bTransparent;
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Transparent Buttons"), ALIGN_TOPLEFT, &bTransparent);
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Buttons Opacity"), ALIGN_TOPLEFT, &bTransparent);
|
||||
if (bTransparent) {
|
||||
char opacity[256];
|
||||
sprintf(opacity, "%s %d", c->T("Opacity :"), g_Config.iTouchButtonOpacity);
|
||||
@@ -1206,7 +1294,6 @@ void ControlsScreen::render() {
|
||||
if (bTransparent != prev)
|
||||
g_Config.iTouchButtonOpacity = bTransparent ? 15 : 65;
|
||||
}
|
||||
UICheckBox(GEN_ID, x, y += stride, c->T("Tilt", "Tilt to Analog (horizontal)"), ALIGN_TOPLEFT, &g_Config.bAccelerometerToAnalogHoriz);
|
||||
|
||||
UIEnd();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user