mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 18:50:29 +00:00
83 lines
2.3 KiB
C
83 lines
2.3 KiB
C
/* 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 <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __VIDEO_MONITOR_H
|
|
#define __VIDEO_MONITOR_H
|
|
|
|
#include <boolean.h>
|
|
#include <stddef.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void video_monitor_adjust_system_rates(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_compute_fps_statistics:
|
|
*
|
|
* Computes monitor FPS statistics.
|
|
**/
|
|
void video_monitor_compute_fps_statistics(void);
|
|
|
|
/**
|
|
* 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
|