mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
osdep: Change timer_name to a saner type
timer_name was a (non-const) pointer to a const char array. Make the symbol the array itself.
This commit is contained in:
parent
e5fab9566d
commit
c693b77e93
@ -30,7 +30,7 @@
|
|||||||
static double relative_time, startup_time;
|
static double relative_time, startup_time;
|
||||||
static double timebase_ratio;
|
static double timebase_ratio;
|
||||||
|
|
||||||
const char *timer_name = "Darwin accurate";
|
const char timer_name[] = "Darwin accurate";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
const char *timer_name =
|
const char timer_name[] =
|
||||||
#ifdef HAVE_NANOSLEEP
|
#ifdef HAVE_NANOSLEEP
|
||||||
"nanosleep()";
|
"nanosleep()";
|
||||||
#else
|
#else
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
const char *timer_name = "Windows native";
|
const char timer_name[] = "Windows native";
|
||||||
|
|
||||||
// Returns current time in microseconds
|
// Returns current time in microseconds
|
||||||
unsigned int GetTimer(){
|
unsigned int GetTimer(){
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef MPLAYER_TIMER_H
|
#ifndef MPLAYER_TIMER_H
|
||||||
#define MPLAYER_TIMER_H
|
#define MPLAYER_TIMER_H
|
||||||
|
|
||||||
extern const char *timer_name;
|
extern const char timer_name[];
|
||||||
|
|
||||||
void InitTimer(void);
|
void InitTimer(void);
|
||||||
unsigned int GetTimer(void);
|
unsigned int GetTimer(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user