From 7dca1abe7abee8519800c99935af3f81db6b1596 Mon Sep 17 00:00:00 2001 From: shashclp Date: Sun, 6 May 2007 19:16:17 +0000 Subject: [PATCH] - Fixed the master brightness, as the old structure isn't used anymore. --- desmume/src/gtk-glade/gdk_gl.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/desmume/src/gtk-glade/gdk_gl.c b/desmume/src/gtk-glade/gdk_gl.c index 827fef7d2..babe8f72e 100755 --- a/desmume/src/gtk-glade/gdk_gl.c +++ b/desmume/src/gtk-glade/gdk_gl.c @@ -252,8 +252,7 @@ gboolean screen (GtkWidget * widget, int viewportscreen) { GPU * gpu; float bright_color = 0.0f; // blend with black float bright_alpha = 0.0f; // don't blend - struct _MASTER_BRIGHT * mBright; - + // we take care to draw the right thing the right place // we need to rearrange widgets not to use this trick screen = (ScreenInvert)?1-viewportscreen:viewportscreen; @@ -273,16 +272,16 @@ gboolean screen (GtkWidget * widget, int viewportscreen) { // master bright gpu = ((screen)?SubScreen:MainScreen).gpu; - mBright = &gpu->dispx_st->dispx_MASTERBRIGHT.bits; - switch (mBright->Mode) + + switch (gpu->MasterBrightMode) { case 1: // Bright up : blend with white bright_color = 1.0f; // no break; case 2: // Bright down : blend with black bright_alpha = 1.0f; // blending max - if (!mBright->FactorEx) - bright_alpha = mBright->Factor / 16.0; + + bright_alpha = gpu->MasterBrightFactor / 16.0; break; // Disabled 0, Reserved 3 default: break;