Remove "Auto Draw Rate" option, there is no reason to turn this off

It can still be turned off or adjusted via Lua, though
This commit is contained in:
jacob1 2021-05-10 00:07:52 -04:00
parent aac6b7258c
commit fca0c62cd7
No known key found for this signature in database
GPG Key ID: 4E58A32D510E1995
8 changed files with 4 additions and 41 deletions

View File

@ -201,14 +201,11 @@ void SDLOpen()
desktopWidth = rect.w; desktopWidth = rect.w;
desktopHeight = rect.h; desktopHeight = rect.h;
} }
if (Client::Ref().GetPrefBool("AutoDrawLimit", false))
SDL_DisplayMode displayMode;
if (!SDL_GetCurrentDisplayMode(displayIndex, &displayMode) && displayMode.refresh_rate >= 60)
{ {
ui::Engine::Ref().AutoDrawingFrequencyLimit = true; ui::Engine::Ref().SetDrawingFrequencyLimit(displayMode.refresh_rate);
SDL_DisplayMode displayMode;
if (!SDL_GetCurrentDisplayMode(displayIndex, &displayMode) && displayMode.refresh_rate >= 60)
{
ui::Engine::Ref().SetDrawingFrequencyLimit(displayMode.refresh_rate);
}
} }
} }

View File

@ -136,7 +136,6 @@ namespace ui
public: public:
bool MomentumScroll = true; bool MomentumScroll = true;
bool AutoDrawingFrequencyLimit = false;
bool ShowAvatars = true; bool ShowAvatars = true;
}; };

View File

@ -117,11 +117,6 @@ void OptionsController::SetMomentumScroll(bool momentumScroll)
model->SetMomentumScroll(momentumScroll); model->SetMomentumScroll(momentumScroll);
} }
void OptionsController::SetAutoDrawLimit(bool autoDrawLimit)
{
model->SetAutoDrawLimit(autoDrawLimit);
}
void OptionsController::Exit() void OptionsController::Exit()
{ {
view->CloseActiveWindow(); view->CloseActiveWindow();

View File

@ -35,7 +35,6 @@ public:
void SetIncludePressure(bool includePressure); void SetIncludePressure(bool includePressure);
void SetPerfectCircle(bool perfectCircle); void SetPerfectCircle(bool perfectCircle);
void SetMomentumScroll(bool momentumScroll); void SetMomentumScroll(bool momentumScroll);
void SetAutoDrawLimit(bool autoDrawLimit);
void Exit(); void Exit();
OptionsView * GetView(); OptionsView * GetView();

View File

@ -241,18 +241,6 @@ void OptionsModel::SetMomentumScroll(bool state)
notifySettingsChanged(); notifySettingsChanged();
} }
bool OptionsModel::GetAutoDrawLimit()
{
return ui::Engine::Ref().AutoDrawingFrequencyLimit;
}
void OptionsModel::SetAutoDrawLimit(bool state)
{
ui::Engine::Ref().AutoDrawingFrequencyLimit = state;
Client::Ref().SetPref("AutoDrawLimit", state);
notifySettingsChanged();
}
void OptionsModel::notifySettingsChanged() void OptionsModel::notifySettingsChanged()
{ {
for (size_t i = 0; i < observers.size(); i++) for (size_t i = 0; i < observers.size(); i++)

View File

@ -54,8 +54,6 @@ public:
void SetPerfectCircle(bool perfectCircle); void SetPerfectCircle(bool perfectCircle);
bool GetMomentumScroll(); bool GetMomentumScroll();
void SetMomentumScroll(bool momentumScroll); void SetMomentumScroll(bool momentumScroll);
bool GetAutoDrawLimit();
void SetAutoDrawLimit(bool autoDrawLimit);
virtual ~OptionsModel(); virtual ~OptionsModel();
}; };

View File

@ -251,17 +251,6 @@ OptionsView::OptionsView():
scrollPanel->AddChild(tempLabel); scrollPanel->AddChild(tempLabel);
scrollPanel->AddChild(momentumScroll); scrollPanel->AddChild(momentumScroll);
currentY += 20;
autoDrawLimit = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Auto Draw Rate", "");
autowidth(autoDrawLimit);
autoDrawLimit->SetActionCallback({ [this] { c->SetAutoDrawLimit(autoDrawLimit->GetChecked()); } });
tempLabel = new ui::Label(ui::Point(autoDrawLimit->Position.X + Graphics::textwidth(autoDrawLimit->GetText()) + 20, currentY), ui::Point(1, 16), "\bg- Based on monitor refresh rate at startup");
autowidth(tempLabel);
tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft;
tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
scrollPanel->AddChild(tempLabel);
scrollPanel->AddChild(autoDrawLimit);
currentY+=20; currentY+=20;
mouseClickRequired = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Sticky Categories", ""); mouseClickRequired = new ui::Checkbox(ui::Point(8, currentY), ui::Point(1, 16), "Sticky Categories", "");
autowidth(mouseClickRequired); autowidth(mouseClickRequired);
@ -362,7 +351,6 @@ void OptionsView::NotifySettingsChanged(OptionsModel * sender)
includePressure->SetChecked(sender->GetIncludePressure()); includePressure->SetChecked(sender->GetIncludePressure());
perfectCirclePressure->SetChecked(sender->GetPerfectCircle()); perfectCirclePressure->SetChecked(sender->GetPerfectCircle());
momentumScroll->SetChecked(sender->GetMomentumScroll()); momentumScroll->SetChecked(sender->GetMomentumScroll());
autoDrawLimit->SetChecked(sender->GetAutoDrawLimit());
} }
void OptionsView::AttachController(OptionsController * c_) void OptionsView::AttachController(OptionsController * c_)

View File

@ -32,7 +32,6 @@ class OptionsView: public ui::Window
ui::DropDown * decoSpace; ui::DropDown * decoSpace;
ui::Checkbox * showAvatars; ui::Checkbox * showAvatars;
ui::Checkbox * momentumScroll; ui::Checkbox * momentumScroll;
ui::Checkbox * autoDrawLimit;
ui::Checkbox * mouseClickRequired; ui::Checkbox * mouseClickRequired;
ui::Checkbox * includePressure; ui::Checkbox * includePressure;
ui::Checkbox * perfectCirclePressure; ui::Checkbox * perfectCirclePressure;