Fast CPU Time & Improved Fast GPU Time (#109)

needs android setting

Signed-off-by: swurl <swurl@swurl.xyz>

Co-authored-by: Aleksandr Popovich <alekpopo@pm.me>
Reviewed-on: eden-emu/eden#109
Co-authored-by: swurl <swurl@swurl.xyz>
Co-committed-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2025-05-29 08:19:51 +00:00 committed by crueter
parent ed47533be8
commit b78089e978
14 changed files with 330 additions and 88 deletions

View file

@ -192,13 +192,18 @@ u64 CoreTiming::GetClockTicks() const {
fres = Common::WallClock::CPUTickToCNTPCT(cpu_ticks);
}
if (Settings::values.use_fast_cpu_time) {
fres = (u64) ((double) fres
* (1.7 + 0.3 * (u32) Settings::values.fast_cpu_time.GetValue()));
}
if (Settings::values.sync_core_speed.GetValue()) {
const double ticks = static_cast<double>(fres);
const double speed_limit = static_cast<double>(Settings::values.speed_limit.GetValue())*0.01;
return static_cast<u64>(ticks/speed_limit);
} else {
return fres;
}
}
}
u64 CoreTiming::GetGPUTicks() const {