Add option to use the Android hardware scaler by setting a low resolution

This commit is contained in:
Henrik Rydgard committed 2014-07-20 00:22:08 +02:00
1 parent d3dce422a8
commit 76bdd84e43
6 files changed
+71 -8

No files matched your search

+12 -1
View File
@@ -137,10 +137,16 @@ void GameSettingsScreen::CreateViews() {
static const char *internalResolutions[] = {"Auto (1:1)", "1x PSP", "2x PSP", "3x PSP", "4x PSP", "5x PSP" };
#endif
resolutionChoice_ = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iInternalResolution, gs->T("Rendering Resolution"), internalResolutions, 0, ARRAY_SIZE(internalResolutions), gs, screenManager()));
resolutionChoice_->OnClick.Handle(this, &GameSettingsScreen::OnResolutionChange);
resolutionChoice_->OnChoice.Handle(this, &GameSettingsScreen::OnResolutionChange);
resolutionEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
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()));
hwscale->OnChoice.Handle(this, &GameSettingsScreen::OnHwScaleChange); // To refresh the display mode
#endif
#ifdef _WIN32
graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gs->T("VSync")));
#endif
@@ -491,6 +497,11 @@ UI::EventReturn GameSettingsScreen::OnResolutionChange(UI::EventParams &e) {
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnHwScaleChange(UI::EventParams &e) {
System_SendMessage("recreate", "");
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnShaderChange(UI::EventParams &e) {
if (gpu) {
gpu->ClearShaderCache();