Permalink
Browse files

UI: Clean up some unused code and flags.

  • Loading branch information...
unknownbrackets committed Dec 2, 2017
1 parent 8a58bf6 commit 8e276002366c4c0252d017661fe8789d3be1950b
Showing with 3 additions and 30 deletions.
  1. +3 −27 UI/GameSettingsScreen.cpp
  2. +0 −3 UI/GameSettingsScreen.h
@@ -236,7 +236,6 @@ void GameSettingsScreen::CreateViews() {
softwareGPU->OnClick.Add([=](EventParams &e) {
if (g_Config.bSoftwareRendering)
settingInfo_->Show(gr->T("SoftGPU Tip", "Currently VERY slow"), e.v);
bloomHackEnable_ = !g_Config.bSoftwareRendering && (g_Config.iInternalResolution != 1);
return UI::EVENT_CONTINUE;
});
softwareGPU->OnClick.Handle(this, &GameSettingsScreen::OnSoftwareRendering);
@@ -356,12 +355,10 @@ void GameSettingsScreen::CreateViews() {
}
return UI::EVENT_CONTINUE;
});
bezierChoiceDisable_ = g_Config.bHardwareTessellation;
beziersChoice->SetDisabledPtr(&bezierChoiceDisable_);
beziersChoice->SetDisabledPtr(&g_Config.bHardwareTessellation);
CheckBox *tessellationHW = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTessellation, gr->T("Hardware Tessellation", "Hardware tessellation (experimental)")));
tessellationHW->OnClick.Add([=](EventParams &e) {
bezierChoiceDisable_ = g_Config.bHardwareTessellation;
settingInfo_->Show(gr->T("HardwareTessellation Tip", "Uses hardware to make curves, always uses a fixed quality"), e.v);
return UI::EVENT_CONTINUE;
});
@@ -809,7 +806,7 @@ UI::EventReturn GameSettingsScreen::OnSoftwareRendering(UI::EventParams &e) {
vtxCacheEnable_ = !g_Config.bSoftwareRendering && g_Config.bHardwareTransform;
postProcEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
resolutionEnable_ = !g_Config.bSoftwareRendering && (g_Config.iRenderingMode != FB_NON_BUFFERED_MODE);
bezierChoiceDisable_ = g_Config.bHardwareTessellation;
bloomHackEnable_ = !g_Config.bSoftwareRendering && (g_Config.iInternalResolution != 1);
tessHWEnable_ = IsBackendSupportHWTess() && !g_Config.bSoftwareRendering && g_Config.bHardwareTransform;
return UI::EVENT_DONE;
}
@@ -975,12 +972,6 @@ UI::EventReturn GameSettingsScreen::OnChangeBackground(UI::EventParams &e) {
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnReloadCheats(UI::EventParams &e) {
// Hmm, strange mechanism.
g_Config.bReloadCheats = true;
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnFullscreenChange(UI::EventParams &e) {
System_SendMessage("toggle_fullscreen", g_Config.bFullScreen ? "1" : "0");
return UI::EVENT_DONE;
@@ -995,7 +986,7 @@ UI::EventReturn GameSettingsScreen::OnResolutionChange(UI::EventParams &e) {
if (g_Config.iAndroidHwScale == 1) {
RecreateActivity();
}
bloomHackEnable_ = g_Config.iInternalResolution != 1;
bloomHackEnable_ = !g_Config.bSoftwareRendering && g_Config.iInternalResolution != 1;
Reporting::UpdateConfig();
return UI::EVENT_DONE;
}
@@ -1005,13 +996,6 @@ UI::EventReturn GameSettingsScreen::OnHwScaleChange(UI::EventParams &e) {
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnShaderChange(UI::EventParams &e) {
if (gpu) {
gpu->ClearShaderCache();
}
return UI::EVENT_DONE;
}
UI::EventReturn GameSettingsScreen::OnDumpNextFrameToLog(UI::EventParams &e) {
if (gpu) {
gpu->DumpNextFrame();
@@ -1054,14 +1038,6 @@ void GameSettingsScreen::onFinish(DialogResult result) {
NativeMessageReceived("gpu_clearCache", "");
}
/*
void GlobalSettingsScreen::CreateViews() {
using namespace UI;
root_ = new ScrollView(ORIENT_VERTICAL);
enableReports_ = Reporting::IsEnabled();
}*/
void GameSettingsScreen::CallbackRenderingBackend(bool yes) {
// If the user ends up deciding not to restart, set the config back to the current backend
// so it doesn't get switched by accident.
@@ -63,7 +63,6 @@ class GameSettingsScreen : public UIDialogScreenWithGameBackground {
UI::EventReturn OnControlMapping(UI::EventParams &e);
UI::EventReturn OnTouchControlLayout(UI::EventParams &e);
UI::EventReturn OnDumpNextFrameToLog(UI::EventParams &e);
UI::EventReturn OnReloadCheats(UI::EventParams &e);
UI::EventReturn OnTiltTypeChange(UI::EventParams &e);
UI::EventReturn OnTiltCustomize(UI::EventParams &e);
UI::EventReturn OnComboKey(UI::EventParams &e);
@@ -85,7 +84,6 @@ class GameSettingsScreen : public UIDialogScreenWithGameBackground {
UI::EventReturn OnDisplayLayoutEditor(UI::EventParams &e);
UI::EventReturn OnResolutionChange(UI::EventParams &e);
UI::EventReturn OnHwScaleChange(UI::EventParams &e);
UI::EventReturn OnShaderChange(UI::EventParams &e);
UI::EventReturn OnRestoreDefaultSettings(UI::EventParams &e);
UI::EventReturn OnRenderingMode(UI::EventParams &e);
UI::EventReturn OnRenderingBackend(UI::EventParams &e);
@@ -119,7 +117,6 @@ class GameSettingsScreen : public UIDialogScreenWithGameBackground {
bool postProcEnable_;
bool resolutionEnable_;
bool bloomHackEnable_;
bool bezierChoiceDisable_;
bool tessHWEnable_;
};

0 comments on commit 8e27600

Please sign in to comment.