SingleCore: Move Host Timing from a sepparate thread to main cpu thread.

This commit is contained in:
Fernando Sahmkow 2020-03-19 13:09:32 -04:00
parent 5d3a2be04f
commit f2ade343e2
7 changed files with 48 additions and 10 deletions

View file

@ -67,6 +67,11 @@ public:
/// Tears down all timing related functionality.
void Shutdown();
/// Sets if emulation is multicore or single core, must be set before Initialize
void SetMulticore(bool is_multicore) {
this->is_multicore = is_multicore;
}
/// Pauses/Unpauses the execution of the timer thread.
void Pause(bool is_paused);
@ -147,6 +152,8 @@ private:
std::atomic<bool> has_started{};
std::function<void(void)> on_thread_init{};
bool is_multicore{};
std::array<std::atomic<u64>, Core::Hardware::NUM_CPU_CORES> ticks_count{};
};