From 37b44bfb6017af9e62eb0b477dd3f48c32c96797 Mon Sep 17 00:00:00 2001 From: riccardom Date: Sat, 11 Apr 2009 14:57:41 +0000 Subject: [PATCH] Apply gtk frontend hunk of explicit type conversion patch posted by ldesnogu_ in #2752961. --- desmume/src/gtk/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index 1265bfc6a..1f2485dc5 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -942,8 +942,8 @@ static gboolean Stylus_Move(GtkWidget *w, GdkEventMotion *e, gpointer data) state=(GdkModifierType)e->state; } - scaled_x = x * nds_screen_size_ratio; - scaled_y = y * nds_screen_size_ratio; + scaled_x = int(x * nds_screen_size_ratio); + scaled_y = int(y * nds_screen_size_ratio); LOG("X=%d, Y=%d, S&1=%d\n", x,y,state&GDK_BUTTON1_MASK); @@ -975,8 +975,8 @@ static gboolean Stylus_Press(GtkWidget * w, GdkEventButton * e, gdk_window_get_pointer(w->window, &x, &y, &state); - scaled_x = x * nds_screen_size_ratio; - scaled_y = y * nds_screen_size_ratio; + scaled_x = int(x * nds_screen_size_ratio); + scaled_y = int(y * nds_screen_size_ratio); if (!(*opengl)) { scaled_y -= 192;