mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
sys_time_get_current_time fixed, CALL_FUNC draft
This commit is contained in:
parent
22e1da5e76
commit
83321c5be7
46 changed files with 385 additions and 351 deletions
|
@ -308,17 +308,20 @@ void Emulator::Pause()
|
|||
|
||||
void Emulator::Resume()
|
||||
{
|
||||
const u64 time = m_pause_start_time.exchange(0);
|
||||
|
||||
if (time)
|
||||
{
|
||||
m_pause_amend_time += get_system_time() - time;
|
||||
}
|
||||
|
||||
// try to resume
|
||||
if (!sync_bool_compare_and_swap(&m_status, Paused, Running))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (const u64 time = m_pause_start_time.exchange(0))
|
||||
{
|
||||
m_pause_amend_time += get_system_time() - time;
|
||||
}
|
||||
else
|
||||
if (!time)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "Resume(): Concurrent access");
|
||||
}
|
||||
|
@ -337,6 +340,8 @@ extern std::map<u32, std::string> g_armv7_dump;
|
|||
|
||||
void Emulator::Stop()
|
||||
{
|
||||
LOG_NOTICE(GENERAL, "Stopping emulator...");
|
||||
|
||||
if (sync_lock_test_and_set(&m_status, Stopped) == Stopped)
|
||||
{
|
||||
return;
|
||||
|
@ -344,10 +349,6 @@ void Emulator::Stop()
|
|||
|
||||
SendDbgCommand(DID_STOP_EMU);
|
||||
|
||||
m_status = Stopped;
|
||||
|
||||
LOG_NOTICE(GENERAL, "Stopping emulator...");
|
||||
|
||||
for (auto& t : GetCPU().GetAllThreads())
|
||||
{
|
||||
t->Sleep(); // trigger status check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue