SDL: init timebase the first time it's needed on Windows, Mac, and OS/2 targets. [R. Belmont]

This commit is contained in:
R. Belmont 2014-09-01 01:55:58 +00:00
parent dad3fa9540
commit 20e7944065
3 changed files with 6 additions and 3 deletions

View File

@ -107,7 +107,8 @@ osd_ticks_t osd_ticks_per_second(void)
{
if (ticks_per_second == 0)
{
return 1; // this isn't correct, but it prevents the crash
// if we haven't computed the value yet, there's no time like the present
init_cycle_counter();
}
return ticks_per_second;
}

View File

@ -141,7 +141,8 @@ osd_ticks_t osd_ticks_per_second(void)
{
if (ticks_per_second == 0)
{
return 1; // this isn't correct, but it prevents the crash
// if we haven't computed the value yet, there's no time like the present
init_cycle_counter();
}
return ticks_per_second;
}

View File

@ -127,7 +127,8 @@ osd_ticks_t osd_ticks_per_second(void)
{
if (ticks_per_second == 0)
{
return 1; // this isn't correct, but it prevents the crash
// if we haven't computed the value yet, there's no time like the present
init_cycle_counter();
}
return ticks_per_second;
}