Merge pull request #1278 from tech4me/bg-color-fix

Port Citra #4047 & #4052: add change background color support
This commit is contained in:
bunnei 2018-09-11 23:13:11 -04:00 committed by GitHub
commit 89825766ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 46 additions and 0 deletions

View file

@ -369,6 +369,12 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x,
* Draws the emulated screens to the emulator window.
*/
void RendererOpenGL::DrawScreen() {
if (renderer_settings.set_background_color) {
// Update background color before drawing
glClearColor(Settings::values.bg_red, Settings::values.bg_green, Settings::values.bg_blue,
0.0f);
}
const auto& layout = render_window.GetFramebufferLayout();
const auto& screen = layout.screen;