3
0
Fork 0
forked from suyu/suyu

Merge pull request #9567 from german77/antialias

opengl: Sanitize antialiasing config
This commit is contained in:
liamwhite 2023-01-06 15:20:23 -05:00 committed by GitHub
commit c0f17e1b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -442,7 +442,13 @@ void RendererOpenGL::DrawScreen(const Layout::FramebufferLayout& layout) {
glBindTextureUnit(0, screen_info.display_texture);
const auto anti_aliasing = Settings::values.anti_aliasing.GetValue();
auto anti_aliasing = Settings::values.anti_aliasing.GetValue();
if (anti_aliasing > Settings::AntiAliasing::LastAA) {
LOG_ERROR(Render_OpenGL, "Invalid antialiasing option selected {}", anti_aliasing);
anti_aliasing = Settings::AntiAliasing::None;
Settings::values.anti_aliasing.SetValue(anti_aliasing);
}
if (anti_aliasing != Settings::AntiAliasing::None) {
glEnablei(GL_SCISSOR_TEST, 0);
auto viewport_width = screen_info.texture.width;