From 0bb50b5372aacad777ee65c7194d35faeb64def5 Mon Sep 17 00:00:00 2001 From: riccardom Date: Sat, 15 May 2010 16:02:56 +0000 Subject: [PATCH] Cleanup ExposeDrawingArea a bit. --- desmume/src/gtk/main.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index 42ebd2c36..be930ade2 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -1111,10 +1111,9 @@ static gboolean ExposeDrawingArea (GtkWidget *widget, GdkEventExpose *event, gpo guchar rgb[SCREENS_PIXEL_SIZE*SCREEN_BYTES_PER_PIXEL]; gfloat vratio, hratio, nscreen_ratio; - gint daW, daH, imgW, imgH, - primaryOffsetX, primaryOffsetY, secondaryOffsetX, secondaryOffsetY, - primaryPixbufOffsetX, primaryPixbufOffsetY, secondaryPixbufOffsetX, secondaryPixbufOffsetY, - screenW, screenH, gapW, gapH; + gint daW, daH, imgW, imgH, screenW, screenH, gapW, gapH; + gint primaryOffsetX, primaryOffsetY, secondaryOffsetX, secondaryOffsetY; + gint secondaryPixbufOffsetX, secondaryPixbufOffsetY; const gboolean gap_vertical = ((nds_screen.orientation == ORIENT_VERTICAL) ^ (nds_screen.rotation_angle == 90 || nds_screen.rotation_angle == 270)); #if GTK_CHECK_VERSION(2,14,0) @@ -1168,8 +1167,6 @@ static gboolean ExposeDrawingArea (GtkWidget *widget, GdkEventExpose *event, gpo secondaryPixbufOffsetX = screenW; secondaryPixbufOffsetY = 0; } - primaryPixbufOffsetX = 0; - primaryPixbufOffsetY = 0; if ((nds_screen.swap) ^ ((nds_screen.orientation == ORIENT_VERTICAL && (nds_screen.rotation_angle == 90 || nds_screen.rotation_angle == 180)) || @@ -1199,7 +1196,7 @@ static gboolean ExposeDrawingArea (GtkWidget *widget, GdkEventExpose *event, gpo drawPixbuf = resizedPixbuf; } - gdk_draw_pixbuf(widget->window, NULL, drawPixbuf, primaryPixbufOffsetX, primaryPixbufOffsetY, primaryOffsetX, primaryOffsetY, screenW, screenH, + gdk_draw_pixbuf(widget->window, NULL, drawPixbuf, 0, 0, primaryOffsetX, primaryOffsetY, screenW, screenH, GDK_RGB_DITHER_NONE, 0,0); if (nds_screen.orientation != ORIENT_SINGLE) {