mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Add an "Auto" mode that makes display res match internal res.
Change wording according to unknown's idea
This commit is contained in:
parent
76bdd84e43
commit
b6569af71c
@ -368,7 +368,7 @@ static ConfigSetting graphicsSettings[] = {
|
||||
ReportedConfigSetting("SoftwareSkinning", &g_Config.bSoftwareSkinning, true),
|
||||
ReportedConfigSetting("TextureFiltering", &g_Config.iTexFiltering, 1),
|
||||
ReportedConfigSetting("InternalResolution", &g_Config.iInternalResolution, &DefaultInternalResolution),
|
||||
ReportedConfigSetting("AndroidHwScale", &g_Config.iAndroidHwScale, 0),
|
||||
ReportedConfigSetting("AndroidHwScale", &g_Config.iAndroidHwScale, 1),
|
||||
ReportedConfigSetting("FrameSkip", &g_Config.iFrameSkip, 0),
|
||||
ReportedConfigSetting("AutoFrameSkip", &g_Config.bAutoFrameSkip, false),
|
||||
ReportedConfigSetting("FrameRate", &g_Config.iFpsLimit, 0),
|
||||
|
@ -142,8 +142,8 @@ void GameSettingsScreen::CreateViews() {
|
||||
resolutionChoice_->SetEnabledPtr(&resolutionEnable_);
|
||||
|
||||
#ifdef ANDROID
|
||||
static const char *deviceResolutions[] = { "Native", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" };
|
||||
UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gs->T("Device Resolution (HW scaler)"), deviceResolutions, 0, ARRAY_SIZE(deviceResolutions), gs, screenManager()));
|
||||
static const char *deviceResolutions[] = { "Native device resolution", "Auto (same as Rendering)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" };
|
||||
UI::PopupMultiChoice *hwscale = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iAndroidHwScale, gs->T("Display Resolution (HW scaler)"), deviceResolutions, 0, ARRAY_SIZE(deviceResolutions), gs, screenManager()));
|
||||
hwscale->OnChoice.Handle(this, &GameSettingsScreen::OnHwScaleChange); // To refresh the display mode
|
||||
#endif
|
||||
|
||||
@ -493,6 +493,9 @@ UI::EventReturn GameSettingsScreen::OnResolutionChange(UI::EventParams &e) {
|
||||
if (gpu) {
|
||||
gpu->Resized();
|
||||
}
|
||||
if (g_Config.iAndroidHwScale == 1) {
|
||||
System_SendMessage("recreate", "");
|
||||
}
|
||||
Reporting::UpdateConfig();
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
@ -200,7 +200,15 @@ std::string NativeQueryConfig(std::string query) {
|
||||
} else if (query == "immersiveMode") {
|
||||
return std::string(g_Config.bImmersiveMode ? "1" : "0");
|
||||
} else if (query == "hwScale") {
|
||||
sprintf(temp, "%i", g_Config.iAndroidHwScale);
|
||||
int scale = g_Config.iAndroidHwScale;
|
||||
if (scale == 1) {
|
||||
// If g_Config.iInternalResolution is also set to Auto (1), we fall back to "Device resolution" (0). It works out.
|
||||
scale = g_Config.iInternalResolution;
|
||||
} else if (scale >= 2) {
|
||||
scale -= 1;
|
||||
}
|
||||
|
||||
sprintf(temp, "%i", scale);
|
||||
return std::string(temp);
|
||||
} else {
|
||||
return std::string("");
|
||||
|
Loading…
Reference in New Issue
Block a user