Skip to content

Commit

Permalink
Merge pull request #9163 from zminhquanz/master
Browse files Browse the repository at this point in the history
Fixed , add setting info
  • Loading branch information
hrydgard authored Dec 20, 2016
2 parents 1852cdd + 8ac9eca commit 80af358
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,20 @@ void GameSettingsScreen::CreateViews() {
framebufferSlowEffects->SetDisabledPtr(&g_Config.bSoftwareRendering);

// Seems solid, so we hide the setting.
// CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gr->T("Vertex Decoder JIT")));
/*CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gr->T("Vertex Decoder JIT")));
// if (PSP_IsInited()) {
// vtxJit->SetEnabled(false);
// }
if (PSP_IsInited()) {
vtxJit->SetEnabled(false);
}*/

static const char *quality[] = { "Low", "Medium", "High"};
PopupMultiChoice *beziersChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iSplineBezierQuality, gr->T("LowCurves", "Spline/Bezier curves quality"), quality, 0, ARRAY_SIZE(quality), gr->GetName(), screenManager()));
beziersChoice->OnChoice.Add([=](EventParams &e) {
if (&g_Config.iSplineBezierQuality != 0) {
settingInfo_->Show(gr->T("LowCurves Tip", "This option will significantly improve/reduce the quality of rendered splines and bezier curves"), e.v);
}
return UI::EVENT_CONTINUE;
});
beziersChoice->SetDisabledPtr(&g_Config.bSoftwareRendering);

// In case we're going to add few other antialiasing option like MSAA in the future.
Expand Down Expand Up @@ -304,6 +310,10 @@ void GameSettingsScreen::CreateViews() {
texScalingType->SetDisabledPtr(&g_Config.bSoftwareRendering);

CheckBox *deposterize = graphicsSettings->Add(new CheckBox(&g_Config.bTexDeposterize, gr->T("Deposterize")));
deposterize->OnClick.Add([=](EventParams &e) {
settingInfo_->Show(gr->T("Deposterize Tip", "Fixes small in-texture glitches that may happen when the texture is upscaled"), e.v);
return UI::EVENT_CONTINUE;
});
deposterize->SetDisabledPtr(&g_Config.bSoftwareRendering);

graphicsSettings->Add(new ItemHeader(gr->T("Texture Filtering")));
Expand Down Expand Up @@ -331,7 +341,12 @@ void GameSettingsScreen::CreateViews() {
#endif

graphicsSettings->Add(new ItemHeader(gr->T("Hack Settings", "Hack Settings (these WILL cause glitches)")));
graphicsSettings->Add(new CheckBox(&g_Config.bTimerHack, gr->T("Timer Hack")));
CheckBox *timerHack = graphicsSettings->Add(new CheckBox(&g_Config.bTimerHack, gr->T("Timer Hack")));
timerHack->OnClick.Add([=](EventParams &e) {
settingInfo_->Show(gr->T("TimerHack Tip", "Faster some games when emulation speed is slower , but may cause glitches/breaking"), e.v);
return UI::EVENT_CONTINUE;
});

CheckBox *alphaHack = graphicsSettings->Add(new CheckBox(&g_Config.bDisableAlphaTest, gr->T("Disable Alpha Test (PowerVR speedup)")));
alphaHack->OnClick.Add([=](EventParams &e) {
settingInfo_->Show(gr->T("DisableAlphaTest Tip", "Faster by sometimes drawing ugly boxes around things"), e.v);
Expand All @@ -346,8 +361,12 @@ void GameSettingsScreen::CreateViews() {
CheckBox *depthWrite = graphicsSettings->Add(new CheckBox(&g_Config.bAlwaysDepthWrite, gr->T("Always Depth Write")));
depthWrite->SetDisabledPtr(&g_Config.bSoftwareRendering);

graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gr->T("Texture Coord Speedhack")));
depthWrite->SetDisabledPtr(&g_Config.bSoftwareRendering);
CheckBox *textureHack = graphicsSettings->Add(new CheckBox(&g_Config.bPrescaleUV, gr->T("Texture Coord Speedhack")));
textureHack->OnClick.Add([=](EventParams &e) {
settingInfo_->Show(gr->T("TextureCoordSpeedhack Tip", "Faster some games that benefit from software skinning further by reducing the number of draw calls"), e.v);
return UI::EVENT_CONTINUE;
});
textureHack->SetDisabledPtr(&g_Config.bSoftwareRendering);

static const char *bloomHackOptions[] = { "Off", "Safe", "Balanced", "Aggressive" };
PopupMultiChoice *bloomHack = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iBloomHack, gr->T("Lower resolution for effects (reduces artifacts)"), bloomHackOptions, 0, ARRAY_SIZE(bloomHackOptions), gr->GetName(), screenManager()));
Expand Down

0 comments on commit 80af358

Please sign in to comment.