Fix GCC unused function/variable warnings

This commit is contained in:
Dan Church 2019-11-14 10:26:30 -06:00
parent 592cfeeaae
commit c5bd183b2b
No known key found for this signature in database
GPG Key ID: EA2BF379CD2CDBD0
2 changed files with 5 additions and 1 deletions

View File

@ -1534,8 +1534,9 @@ double
Snes9xWindow::get_refresh_rate ()
{
double refresh_rate = 0.0;
#if defined GDK_WINDOWING_X11 || defined GDK_WINDOWING_WAYLAND
GdkDisplay *display = gtk_widget_get_display (window);
GdkWindow *gdk_window = gtk_widget_get_window (window);
#endif
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
@ -1549,6 +1550,7 @@ Snes9xWindow::get_refresh_rate ()
#ifdef GDK_WINDOWING_WAYLAND
if (GDK_IS_WAYLAND_DISPLAY (display))
{
GdkWindow *gdk_window = gtk_widget_get_window (window);
GdkMonitor *monitor = gdk_display_get_monitor_at_window(display, gdk_window);
refresh_rate = (double) gdk_monitor_get_refresh_rate(monitor) / 1000.0;
}

View File

@ -268,6 +268,7 @@ static std::string canonicalize(const std::string &noncanonical)
return filename_string;
}
#ifdef USE_SLANG
static GLuint string_to_format(char *format)
{
#define MATCH(s, f) \
@ -306,6 +307,7 @@ static GLuint string_to_format(char *format)
return GL_RGBA;
}
#endif
// filename must be canonical
void GLSLShader::read_shader_file_with_includes(std::string filename,