diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index 40bc95c824..4a1400f30e 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -2,7 +2,6 @@ #include -#include "Core/Config.h" #include "Common/System/Display.h" #include "Common/System/System.h" #include "Common/UI/UI.h" @@ -62,11 +61,14 @@ void UIContext::BeginFrame() { } uidrawbufferTop_->SetCurZ(0.0f); uidrawbuffer_->SetCurZ(0.0f); - uidrawbuffer_->SetTintSaturation(g_Config.fUITint, g_Config.fUISaturation); - uidrawbufferTop_->SetTintSaturation(g_Config.fUITint, g_Config.fUISaturation); ActivateTopScissor(); } +void UIContext::SetTintSaturation(float tint, float sat) { + uidrawbuffer_->SetTintSaturation(tint, sat); + uidrawbufferTop_->SetTintSaturation(tint, sat); +} + void UIContext::Begin() { BeginPipeline(ui_pipeline_, sampler_); } diff --git a/Common/UI/Context.h b/Common/UI/Context.h index b7c6982176..1e2767d181 100644 --- a/Common/UI/Context.h +++ b/Common/UI/Context.h @@ -75,6 +75,8 @@ public: // Utility methods TextDrawer *Text() const { return textDrawer_; } + void SetTintSaturation(float tint, float sat); + void SetFontStyle(const UI::FontStyle &style); const UI::FontStyle &GetFontStyle() { return *fontStyle_; } void SetFontScale(float scaleX, float scaleY); diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 0c98c0cadb..e04226d658 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -1138,6 +1138,8 @@ void NativeRender(GraphicsContext *graphicsContext) { ui_draw2d.PushDrawMatrix(ortho); ui_draw2d_front.PushDrawMatrix(ortho); + screenManager->getUIContext()->SetTintSaturation(g_Config.fUITint, g_Config.fUISaturation); + // All actual rendering happen in here. screenManager->render(); if (screenManager->getUIContext()->Text()) {