From 7c39cc34baf17bf2fad1b1144d3f42bb35106590 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Wed, 5 Feb 2014 03:22:07 -0600 Subject: [PATCH] Fix some compiler warnings. --- gtk/src/gtk_control.cpp | 2 +- gtk/src/gtk_control.h | 2 +- gtk/src/gtk_display.cpp | 2 ++ gtk/src/gtk_display_driver.h | 1 + gtk/src/gtk_display_driver_opengl.cpp | 12 +++++++++--- gtk/src/gtk_sound_driver.h | 1 + 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gtk/src/gtk_control.cpp b/gtk/src/gtk_control.cpp index 13d935f1..906a2846 100644 --- a/gtk/src/gtk_control.cpp +++ b/gtk/src/gtk_control.cpp @@ -469,7 +469,7 @@ JoyDevice::~JoyDevice (void) } void -JoyDevice::add_event (int parameter, int state) +JoyDevice::add_event (unsigned int parameter, unsigned int state) { JoyEvent event = { parameter, state }; diff --git a/gtk/src/gtk_control.h b/gtk/src/gtk_control.h index 916ad192..3afaa9e3 100644 --- a/gtk/src/gtk_control.h +++ b/gtk/src/gtk_control.h @@ -87,7 +87,7 @@ class JoyDevice private: void poll_events (void); - void add_event (int parameter, int state); + void add_event (unsigned int parameter, unsigned int state); }; #endif diff --git a/gtk/src/gtk_display.cpp b/gtk/src/gtk_display.cpp index c2897e1b..31e3947d 100644 --- a/gtk/src/gtk_display.cpp +++ b/gtk/src/gtk_display.cpp @@ -718,6 +718,7 @@ S9xMergeHires (void *buffer, return; } +#if 0 static void S9xBlendHires (void *buffer, int pitch, int &width, int &height) { @@ -751,6 +752,7 @@ S9xBlendHires (void *buffer, int pitch, int &width, int &height) return; } +#endif void filter_2x (void *src, diff --git a/gtk/src/gtk_display_driver.h b/gtk/src/gtk_display_driver.h index 3aa11742..d36fd467 100644 --- a/gtk/src/gtk_display_driver.h +++ b/gtk/src/gtk_display_driver.h @@ -6,6 +6,7 @@ class S9xDisplayDriver { public: + virtual ~S9xDisplayDriver() {} virtual void refresh (int width, int height) = 0; virtual int init (void) = 0; virtual void deinit (void) = 0; diff --git a/gtk/src/gtk_display_driver_opengl.cpp b/gtk/src/gtk_display_driver_opengl.cpp index 0163f7d8..34ae173a 100644 --- a/gtk/src/gtk_display_driver_opengl.cpp +++ b/gtk/src/gtk_display_driver_opengl.cpp @@ -318,16 +318,22 @@ S9xOpenGLDisplayDriver::update (int width, int height) if (using_shaders) { GLint location; + float inputSize[2]; + float outputSize[2]; + float textureSize[2]; - float inputSize[2] = { width, height }; + inputSize[0] = width; + inputSize[1] = height; location = glGetUniformLocation (program, "rubyInputSize"); glUniform2fv (location, 1, inputSize); - float outputSize[2] = {w , h }; + outputSize[0] = w; + outputSize[1] = h; location = glGetUniformLocation (program, "rubyOutputSize"); glUniform2fv (location, 1, outputSize); - float textureSize[2] = { texture_width, texture_height }; + textureSize[0] = texture_width; + textureSize[1] = texture_height; location = glGetUniformLocation (program, "rubyTextureSize"); glUniform2fv (location, 1, textureSize); } diff --git a/gtk/src/gtk_sound_driver.h b/gtk/src/gtk_sound_driver.h index 1c66ccd8..034c7012 100644 --- a/gtk/src/gtk_sound_driver.h +++ b/gtk/src/gtk_sound_driver.h @@ -6,6 +6,7 @@ class S9xSoundDriver { public: + virtual ~S9xSoundDriver () {} virtual void init (void) = 0; virtual void terminate (void) = 0; virtual bool8 open_device (void) = 0;