From 85dbeeb8f96fda3f6349f847d14ce0ffd4b65d8d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 22 Nov 2015 13:32:46 +0100 Subject: [PATCH] No more video_monitor.h --- driver.c | 1 - gfx/common/x11_common.c | 1 - gfx/d3d/d3d.cpp | 1 - gfx/drivers/ctr_gfx.c | 12 ++-- gfx/drivers/dispmanx_gfx.c | 14 ++--- gfx/drivers/exynos_gfx.c | 1 - gfx/drivers/gx_gfx.c | 1 - gfx/drivers/omap_gfx.c | 24 ++++---- gfx/drivers/psp1_gfx.c | 2 +- gfx/drivers/sdl2_gfx.c | 11 ++-- gfx/drivers/sdl_gfx.c | 10 ++-- gfx/drivers/sunxi_gfx.c | 1 - gfx/drivers/vita2d_gfx.c | 1 - gfx/drivers/xshm.c | 15 +++-- gfx/drivers/xvideo.c | 1 - gfx/drivers_context/androidegl_ctx.c | 1 - gfx/drivers_context/bbqnx_ctx.c | 1 - gfx/drivers_context/cgl_ctx.c | 1 - gfx/drivers_context/cocoa_gl_ctx.m | 1 - gfx/drivers_context/d3d_ctx.cpp | 1 - gfx/drivers_context/drm_egl_ctx.c | 1 - gfx/drivers_context/emscriptenegl_ctx.c | 1 - gfx/drivers_context/gfx_null_ctx.c | 1 - gfx/drivers_context/mali_fbdev_ctx.c | 1 - gfx/drivers_context/ps3_ctx.c | 1 - gfx/drivers_context/sdl_gl_ctx.c | 1 - gfx/drivers_context/vc_egl_ctx.c | 1 - gfx/drivers_context/vivante_fbdev_ctx.c | 1 - gfx/drivers_context/wayland_ctx.c | 1 - gfx/drivers_context/wgl_ctx.cpp | 1 - gfx/video_driver.c | 1 - gfx/video_driver.h | 42 ++++++++++++++ gfx/video_monitor.h | 73 ------------------------- menu/menu_setting.c | 1 - ui/drivers/ui_win32.c | 1 - 35 files changed, 89 insertions(+), 140 deletions(-) delete mode 100644 gfx/video_monitor.h diff --git a/driver.c b/driver.c index f053ae2a37..512cd84a33 100644 --- a/driver.c +++ b/driver.c @@ -18,7 +18,6 @@ #include "general.h" #include "msg_hash.h" -#include "gfx/video_monitor.h" #include "audio/audio_monitor.h" #include "msg_hash.h" diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index b797a61754..087b91cfd2 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -25,7 +25,6 @@ #include "x11_common.h" #include "../../general.h" -#include "../video_monitor.h" Colormap g_x11_cmap; Window g_x11_win; diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index aaaf17397a..1a092cee1d 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -26,7 +26,6 @@ #include #include "d3d.h" -#include "../video_monitor.h" #include "../video_common.h" #include "../../dynamic.h" #include "render_chain_driver.h" diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 3676367875..5cac57fa86 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -13,20 +13,22 @@ * If not, see . */ -#include <3ds.h> #include #include #include + +#include <3ds.h> + +#include + #include "ctr_gu.h" #include "ctr_sprite_shader_shbin.h" #include "../../general.h" #include "../../driver.h" -#include "../video_monitor.h" -#include "retroarch.h" -#include "performance.h" -#include "retro_inline.h" +#include "../../retroarch.h" +#include "../../performance.h" #define CTR_TOP_FRAMEBUFFER_WIDTH 400 #define CTR_TOP_FRAMEBUFFER_HEIGHT 240 diff --git a/gfx/drivers/dispmanx_gfx.c b/gfx/drivers/dispmanx_gfx.c index 07152572c5..d56f272f0b 100644 --- a/gfx/drivers/dispmanx_gfx.c +++ b/gfx/drivers/dispmanx_gfx.c @@ -13,20 +13,20 @@ * If not, see . */ -#include "../../driver.h" -#include "../../general.h" -#include "../../retroarch.h" -#include "../video_monitor.h" -#include "../video_context_driver.h" -#include "../font_renderer_driver.h" - #include + #include #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "../../driver.h" +#include "../../general.h" +#include "../../retroarch.h" +#include "../video_context_driver.h" +#include "../font_renderer_driver.h" + struct dispmanx_page { /* Each page contains it's own resource handler diff --git a/gfx/drivers/exynos_gfx.c b/gfx/drivers/exynos_gfx.c index 49ab1d89a0..5f78727aca 100644 --- a/gfx/drivers/exynos_gfx.c +++ b/gfx/drivers/exynos_gfx.c @@ -35,7 +35,6 @@ #include "../../general.h" #include "../../retroarch.h" #include "../../runloop.h" -#include "../video_monitor.h" #include "../font_renderer_driver.h" /* TODO: Honor these properties: vsync, menu rotation, menu alpha, aspect ratio change */ diff --git a/gfx/drivers/gx_gfx.c b/gfx/drivers/gx_gfx.c index 1e0fe61467..9bbf6b20aa 100644 --- a/gfx/drivers/gx_gfx.c +++ b/gfx/drivers/gx_gfx.c @@ -28,7 +28,6 @@ #include "../drivers_font_renderer/bitmap.h" #include "../../menu/menu_driver.h" #include "../../menu/menu_display.h" -#include "../video_monitor.h" #ifdef HW_RVL #include "../../memory/wii/mem2_manager.h" diff --git a/gfx/drivers/omap_gfx.c b/gfx/drivers/omap_gfx.c index aaea1538e6..6a6b95816a 100644 --- a/gfx/drivers/omap_gfx.c +++ b/gfx/drivers/omap_gfx.c @@ -14,16 +14,8 @@ * If not, see . */ -#include "../../driver.h" #include #include -#include "../../general.h" -#include "../../retroarch.h" -#include -#include -#include "../video_monitor.h" -#include "../video_context_driver.h" -#include "../font_renderer_driver.h" #include #include @@ -33,13 +25,23 @@ #include #include -#include -#include - #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include +#include + +#include +#include + +#include "../../driver.h" +#include "../../general.h" +#include "../../retroarch.h" + +#include "../video_context_driver.h" +#include "../font_renderer_driver.h" + typedef struct omapfb_page { unsigned yoffset; diff --git a/gfx/drivers/psp1_gfx.c b/gfx/drivers/psp1_gfx.c index 3f9da8dc1c..32d9cf43fa 100644 --- a/gfx/drivers/psp1_gfx.c +++ b/gfx/drivers/psp1_gfx.c @@ -22,10 +22,10 @@ #include #include + #include "../../defines/psp_defines.h" #include "../../general.h" #include "../../driver.h" -#include "../video_monitor.h" #ifndef SCEGU_SCR_WIDTH #define SCEGU_SCR_WIDTH 480 diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 91985733c1..ebfb7b16e5 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -14,17 +14,18 @@ * If not, see . */ +#include +#include + +#include +#include + #include "SDL.h" #include "SDL_syswm.h" #include "../../driver.h" -#include -#include #include "../../general.h" #include "../../retroarch.h" #include "../../performance.h" -#include -#include -#include "../video_monitor.h" #include "../video_context_driver.h" #include "../font_renderer_driver.h" diff --git a/gfx/drivers/sdl_gfx.c b/gfx/drivers/sdl_gfx.c index bac729e1d4..3ff4f1fab8 100644 --- a/gfx/drivers/sdl_gfx.c +++ b/gfx/drivers/sdl_gfx.c @@ -14,14 +14,16 @@ * If not, see . */ -#include "SDL.h" -#include "../../driver.h" #include #include + +#include + +#include "SDL.h" + +#include "../../driver.h" #include "../../general.h" #include "../../performance.h" -#include -#include "../video_monitor.h" #include "../video_context_driver.h" #include "../font_renderer_driver.h" diff --git a/gfx/drivers/sunxi_gfx.c b/gfx/drivers/sunxi_gfx.c index 43a676e340..ad0bb1c05a 100644 --- a/gfx/drivers/sunxi_gfx.c +++ b/gfx/drivers/sunxi_gfx.c @@ -25,7 +25,6 @@ #include "../../general.h" #include "../../retroarch.h" -#include "../video_monitor.h" #include "../font_renderer_driver.h" #define NUMPAGES 2 diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index f2166437e4..32f4fd1bf7 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -20,7 +20,6 @@ #include "../../defines/psp_defines.h" #include "../../general.h" #include "../../driver.h" -#include "../video_monitor.h" typedef struct vita_menu_frame { diff --git a/gfx/drivers/xshm.c b/gfx/drivers/xshm.c index 7c438e2a4f..386114de18 100644 --- a/gfx/drivers/xshm.c +++ b/gfx/drivers/xshm.c @@ -13,25 +13,24 @@ * If not, see . */ -#include "../../driver.h" -#include "../../general.h" #include #include #include #include -#include "../video_monitor.h" -#include "../font_renderer_driver.h" -#include -#include "../common/x11_common.h" - -#include /*#include */ #include #include #include #include +#include + +#include "../../driver.h" +#include "../../general.h" +#include "../font_renderer_driver.h" +#include "../common/x11_common.h" + typedef struct xshm { Display* display; diff --git a/gfx/drivers/xvideo.c b/gfx/drivers/xvideo.c index b8bcfbb6d8..af8e24f3c7 100644 --- a/gfx/drivers/xvideo.c +++ b/gfx/drivers/xvideo.c @@ -31,7 +31,6 @@ #include "../../driver.h" #include "../../general.h" -#include "../video_monitor.h" #include "../font_renderer_driver.h" #include "../common/x11_common.h" diff --git a/gfx/drivers_context/androidegl_ctx.c b/gfx/drivers_context/androidegl_ctx.c index af66bb8a19..7d08b5539c 100644 --- a/gfx/drivers_context/androidegl_ctx.c +++ b/gfx/drivers_context/androidegl_ctx.c @@ -22,7 +22,6 @@ #include "../../driver.h" #include "../../general.h" #include "../../runloop.h" -#include "../video_monitor.h" #include "../common/egl_common.h" #include "../common/gl_common.h" diff --git a/gfx/drivers_context/bbqnx_ctx.c b/gfx/drivers_context/bbqnx_ctx.c index 68be0b3d30..d64e4b6419 100644 --- a/gfx/drivers_context/bbqnx_ctx.c +++ b/gfx/drivers_context/bbqnx_ctx.c @@ -27,7 +27,6 @@ #include "../../driver.h" #include "../../general.h" #include "../../runloop.h" -#include "../video_monitor.h" #include "../common/egl_common.h" #include "../common/gl_common.h" diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index 440607a439..0859a2e943 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -33,7 +33,6 @@ #include "../../runloop.h" #include "../../configuration.h" #include "../video_context_driver.h" -#include "../video_monitor.h" typedef int CGSConnectionID; typedef int CGSWindowID; diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 644c101603..9a077c1d7d 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -32,7 +32,6 @@ #import "../../ui/drivers/cocoa/cocoa_common.h" #include "../video_context_driver.h" -#include "../video_monitor.h" #include "../../configuration.h" #include "../../runloop.h" diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index 675ca8431a..356950b079 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -23,7 +23,6 @@ #include "../common/win32_common.h" #include "../../runloop.h" -#include "../video_monitor.h" #ifdef _MSC_VER #ifndef _XBOX diff --git a/gfx/drivers_context/drm_egl_ctx.c b/gfx/drivers_context/drm_egl_ctx.c index bddcac0561..523d0f8ecc 100644 --- a/gfx/drivers_context/drm_egl_ctx.c +++ b/gfx/drivers_context/drm_egl_ctx.c @@ -41,7 +41,6 @@ #include "../../runloop.h" #include "../common/egl_common.h" #include "../common/gl_common.h" -#include "../video_monitor.h" #ifdef HAVE_CONFIG_H #include "../../config.h" diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 60221ef9ca..a8a44f6de0 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -24,7 +24,6 @@ #include "../video_context_driver.h" #include "../common/egl_common.h" #include "../common/gl_common.h" -#include "../video_monitor.h" #ifdef HAVE_CONFIG_H #include "../../config.h" diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index a19b7dd94a..31cf3c39e7 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -18,7 +18,6 @@ #include "../../driver.h" #include "../video_context_driver.h" -#include "../video_monitor.h" static void gfx_ctx_null_swap_interval(void *data, unsigned interval) { diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 0f52f2c60f..19d07148d8 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -26,7 +26,6 @@ #include "../../driver.h" #include "../../general.h" #include "../../runloop.h" -#include "../video_monitor.h" #include "../common/egl_common.h" #include "../common/gl_common.h" diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 182eb9e08a..040908c3ce 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -31,7 +31,6 @@ #include "../../defines/ps3_defines.h" #include "../common/gl_common.h" #include "../video_context_driver.h" -#include "../video_monitor.h" #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 4a17738e04..c5867abc6c 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -19,7 +19,6 @@ #include "../../driver.h" #include "../../runloop.h" #include "../common/gl_common.h" -#include "../video_monitor.h" static enum gfx_ctx_api g_api = GFX_CTX_OPENGL_API; static unsigned g_major = 2; diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 428e1e6f07..e660796f93 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -31,7 +31,6 @@ #include "../video_context_driver.h" #include "../common/egl_common.h" #include "../common/gl_common.h" -#include "../video_monitor.h" #include diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index 00216546d8..a303ec48ae 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -19,7 +19,6 @@ #include "../../driver.h" #include "../../general.h" #include "../../runloop.h" -#include "../video_monitor.h" #include "../common/egl_common.h" #include "../common/gl_common.h" diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 81d4311525..671dc75860 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -23,7 +23,6 @@ #include "../../driver.h" #include "../../general.h" #include "../../runloop.h" -#include "../video_monitor.h" #include "../common/egl_common.h" #include "../common/gl_common.h" diff --git a/gfx/drivers_context/wgl_ctx.cpp b/gfx/drivers_context/wgl_ctx.cpp index 60af207880..153d05593b 100644 --- a/gfx/drivers_context/wgl_ctx.cpp +++ b/gfx/drivers_context/wgl_ctx.cpp @@ -35,7 +35,6 @@ #include "../../dynamic.h" #include "../../runloop.h" #include "../video_context_driver.h" -#include "../video_monitor.h" #include "../common/gl_common.h" #include "../common/win32_common.h" diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 8fcfb5a249..4dc3be8ae1 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -21,7 +21,6 @@ #include "video_thread_wrapper.h" #include "video_pixel_converter.h" #include "video_context_driver.h" -#include "video_monitor.h" #include "../config.def.h" #include "../general.h" #include "../performance.h" diff --git a/gfx/video_driver.h b/gfx/video_driver.h index d0f9bf77bb..e8d394551e 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -456,6 +456,48 @@ struct retro_system_av_info *video_viewport_get_system_av_info(void); struct video_viewport *video_viewport_get_custom(void); +/** + * video_monitor_set_refresh_rate: + * @hz : New refresh rate for monitor. + * + * Sets monitor refresh rate to new value. + **/ +void video_monitor_set_refresh_rate(float hz); + +/** + * video_monitor_fps_statistics + * @refresh_rate : Monitor refresh rate. + * @deviation : Deviation from measured refresh rate. + * @sample_points : Amount of sampled points. + * + * Gets the monitor FPS statistics based on the current + * runtime. + * + * Returns: true (1) on success. + * false (0) if: + * a) threaded video mode is enabled + * b) less than 2 frame time samples. + * c) FPS monitor enable is off. + **/ +bool video_monitor_fps_statistics(double *refresh_rate, + double *deviation, unsigned *sample_points); + +/** + * video_monitor_get_fps: + * @buf : string suitable for Window title + * @size : size of buffer. + * @buf_fps : string of raw FPS only (optional). + * @size_fps : size of raw FPS buffer. + * + * Get the amount of frames per seconds. + * + * Returns: true if framerate per seconds could be obtained, + * otherwise false. + * + **/ +bool video_monitor_get_fps(char *buf, size_t size, + char *buf_fps, size_t size_fps); + extern video_driver_t video_gl; extern video_driver_t video_psp1; extern video_driver_t video_vita2d; diff --git a/gfx/video_monitor.h b/gfx/video_monitor.h deleted file mode 100644 index f2c4257df6..0000000000 --- a/gfx/video_monitor.h +++ /dev/null @@ -1,73 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2015 - Daniel De Matteis - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#ifndef __VIDEO_MONITOR_H -#define __VIDEO_MONITOR_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * video_monitor_set_refresh_rate: - * @hz : New refresh rate for monitor. - * - * Sets monitor refresh rate to new value. - **/ -void video_monitor_set_refresh_rate(float hz); - -/** - * video_monitor_fps_statistics - * @refresh_rate : Monitor refresh rate. - * @deviation : Deviation from measured refresh rate. - * @sample_points : Amount of sampled points. - * - * Gets the monitor FPS statistics based on the current - * runtime. - * - * Returns: true (1) on success. - * false (0) if: - * a) threaded video mode is enabled - * b) less than 2 frame time samples. - * c) FPS monitor enable is off. - **/ -bool video_monitor_fps_statistics(double *refresh_rate, - double *deviation, unsigned *sample_points); - -/** - * video_monitor_get_fps: - * @buf : string suitable for Window title - * @size : size of buffer. - * @buf_fps : string of raw FPS only (optional). - * @size_fps : size of raw FPS buffer. - * - * Get the amount of frames per seconds. - * - * Returns: true if framerate per seconds could be obtained, - * otherwise false. - * - **/ -bool video_monitor_get_fps(char *buf, size_t size, - char *buf_fps, size_t size_fps); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 4672004a10..015fb19644 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -37,7 +37,6 @@ #include "../driver.h" #include "../general.h" -#include "../gfx/video_monitor.h" #include "../dynamic.h" #include "../input/input_common.h" #include "../input/input_autodetect.h" diff --git a/ui/drivers/ui_win32.c b/ui/drivers/ui_win32.c index 0f0c7e6d19..7f7e252cb7 100644 --- a/ui/drivers/ui_win32.c +++ b/ui/drivers/ui_win32.c @@ -49,7 +49,6 @@ #include "../../driver.h" #include "../../runloop.h" #include "../../gfx/video_context_driver.h" -#include "../../gfx/video_monitor.h" #include "../../gfx/common/gl_common.h" #include "../../gfx/common/win32_common.h"