mirror of https://github.com/snes9xgit/snes9x.git
Remove 'else', fix formatting.
This commit is contained in:
parent
e7f4bd63fa
commit
62f3761aa6
|
@ -1622,14 +1622,16 @@ Snes9xWindow::get_refresh_rate (void)
|
|||
double refresh_rate = 0.0;
|
||||
GdkDisplay *display = gtk_widget_get_display (window);
|
||||
GdkWindow *gdk_window = gtk_widget_get_window (window);
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_DISPLAY (display))
|
||||
{
|
||||
Window xid = GDK_COMPAT_WINDOW_XID (gtk_widget_get_window (window));
|
||||
Display *dpy = gdk_x11_display_get_xdisplay (gtk_widget_get_display (window));
|
||||
refresh_rate = XRRGetExactRefreshRate (dpy, xid);
|
||||
} else
|
||||
Window xid = GDK_COMPAT_WINDOW_XID (gtk_widget_get_window (window));
|
||||
Display *dpy = gdk_x11_display_get_xdisplay (gtk_widget_get_display (window));
|
||||
refresh_rate = XRRGetExactRefreshRate (dpy, xid);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_DISPLAY (display))
|
||||
{
|
||||
|
@ -1637,6 +1639,7 @@ Snes9xWindow::get_refresh_rate (void)
|
|||
refresh_rate = (double) gdk_monitor_get_refresh_rate(monitor) / 1000.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (refresh_rate < 10.0)
|
||||
{
|
||||
printf ("Warning: Couldn't read refresh rate.\n");
|
||||
|
|
Loading…
Reference in New Issue