add Bottom Screen Opacity in Enhancement tab

This commit is contained in:
blakdulz
2023-05-13 05:09:06 +07:00
committed by OpenSauce04
parent ecf5dcaa72
commit bf6bcb0591
3 changed files with 204 additions and 163 deletions

View File

@@ -697,7 +697,8 @@ void RendererOpenGL::DrawScreens(const Layout::FramebufferLayout& layout, bool f
}
void RendererOpenGL::ApplySecondLayerOpacity() {
if (Settings::values.custom_layout &&
if ((Settings::values.layout_option.GetValue() == Settings::LayoutOption::CustomLayout ||
Settings::values.custom_layout) &&
Settings::values.custom_second_layer_opacity.GetValue() < 100) {
state.blend.src_rgb_func = GL_CONSTANT_ALPHA;
state.blend.src_a_func = GL_CONSTANT_ALPHA;
@@ -708,7 +709,8 @@ void RendererOpenGL::ApplySecondLayerOpacity() {
}
void RendererOpenGL::ResetSecondLayerOpacity() {
if (Settings::values.custom_layout &&
if ((Settings::values.layout_option.GetValue() == Settings::LayoutOption::CustomLayout ||
Settings::values.custom_layout) &&
Settings::values.custom_second_layer_opacity.GetValue() < 100) {
state.blend.src_rgb_func = GL_ONE;
state.blend.dst_rgb_func = GL_ZERO;