fix libretro tickcount 2
@@ -51,13 +51,15 @@ int64_t NP2_TickCount_GetFrequency(void) {
#elif defined(__LIBRETRO__)
int64_t nowcount = cpu_features_get_perf_counter();
int64_t nowtime = cpu_features_get_time_usec();
- lastcount = nowtime;
- lasttime = nowtime;
+ int64_t ret;
if(nowtime > lasttime) {
- return ((nowcount - lastcount) / (nowtime - lasttime)) * 1000000;
+ ret = ((nowcount - lastcount) / (nowtime - lasttime)) * 1000000;
} else {
- return 0;
+ ret = 0;
}
+ lastcount = nowtime;
+ lasttime = nowtime;
+ return ret;
#else
struct timespec res;
clock_getres(CLOCK_MONOTONIC, &res);
