diff options
| author | 2016-12-22 00:00:01 -0500 | |
|---|---|---|
| committer | 2016-12-22 00:27:46 -0500 | |
| commit | e26fbfd1d72c026d0f25c09595e7123459b1734f (patch) | |
| tree | 5d99608b33c991b59c25cd2014be8bacb136c29b /src/core/core_timing.cpp | |
| parent | Address clang-format issues. (diff) | |
| download | yuzu-e26fbfd1d72c026d0f25c09595e7123459b1734f.tar.gz yuzu-e26fbfd1d72c026d0f25c09595e7123459b1734f.tar.xz yuzu-e26fbfd1d72c026d0f25c09595e7123459b1734f.zip | |
core: Replace "AppCore" nomenclature with just "CPU".
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 9fe374795..a437d0823 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -146,7 +146,7 @@ void UnregisterAllEvents() { | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | void Init() { | 148 | void Init() { |
| 149 | Core::AppCore().down_count = INITIAL_SLICE_LENGTH; | 149 | Core::CPU().down_count = INITIAL_SLICE_LENGTH; |
| 150 | g_slice_length = INITIAL_SLICE_LENGTH; | 150 | g_slice_length = INITIAL_SLICE_LENGTH; |
| 151 | global_timer = 0; | 151 | global_timer = 0; |
| 152 | idled_cycles = 0; | 152 | idled_cycles = 0; |
| @@ -186,7 +186,7 @@ void Shutdown() { | |||
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | u64 GetTicks() { | 188 | u64 GetTicks() { |
| 189 | return (u64)global_timer + g_slice_length - Core::AppCore().down_count; | 189 | return (u64)global_timer + g_slice_length - Core::CPU().down_count; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | u64 GetIdleTicks() { | 192 | u64 GetIdleTicks() { |
| @@ -460,18 +460,18 @@ void MoveEvents() { | |||
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | void ForceCheck() { | 462 | void ForceCheck() { |
| 463 | s64 cycles_executed = g_slice_length - Core::AppCore().down_count; | 463 | s64 cycles_executed = g_slice_length - Core::CPU().down_count; |
| 464 | global_timer += cycles_executed; | 464 | global_timer += cycles_executed; |
| 465 | // This will cause us to check for new events immediately. | 465 | // This will cause us to check for new events immediately. |
| 466 | Core::AppCore().down_count = 0; | 466 | Core::CPU().down_count = 0; |
| 467 | // But let's not eat a bunch more time in Advance() because of this. | 467 | // But let's not eat a bunch more time in Advance() because of this. |
| 468 | g_slice_length = 0; | 468 | g_slice_length = 0; |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | void Advance() { | 471 | void Advance() { |
| 472 | s64 cycles_executed = g_slice_length - Core::AppCore().down_count; | 472 | s64 cycles_executed = g_slice_length - Core::CPU().down_count; |
| 473 | global_timer += cycles_executed; | 473 | global_timer += cycles_executed; |
| 474 | Core::AppCore().down_count = g_slice_length; | 474 | Core::CPU().down_count = g_slice_length; |
| 475 | 475 | ||
| 476 | if (has_ts_events) | 476 | if (has_ts_events) |
| 477 | MoveEvents(); | 477 | MoveEvents(); |
| @@ -480,7 +480,7 @@ void Advance() { | |||
| 480 | if (!first) { | 480 | if (!first) { |
| 481 | if (g_slice_length < 10000) { | 481 | if (g_slice_length < 10000) { |
| 482 | g_slice_length += 10000; | 482 | g_slice_length += 10000; |
| 483 | Core::AppCore().down_count += g_slice_length; | 483 | Core::CPU().down_count += g_slice_length; |
| 484 | } | 484 | } |
| 485 | } else { | 485 | } else { |
| 486 | // Note that events can eat cycles as well. | 486 | // Note that events can eat cycles as well. |
| @@ -490,7 +490,7 @@ void Advance() { | |||
| 490 | 490 | ||
| 491 | const int diff = target - g_slice_length; | 491 | const int diff = target - g_slice_length; |
| 492 | g_slice_length += diff; | 492 | g_slice_length += diff; |
| 493 | Core::AppCore().down_count += diff; | 493 | Core::CPU().down_count += diff; |
| 494 | } | 494 | } |
| 495 | if (advance_callback) | 495 | if (advance_callback) |
| 496 | advance_callback(static_cast<int>(cycles_executed)); | 496 | advance_callback(static_cast<int>(cycles_executed)); |
| @@ -506,12 +506,12 @@ void LogPendingEvents() { | |||
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | void Idle(int max_idle) { | 508 | void Idle(int max_idle) { |
| 509 | s64 cycles_down = Core::AppCore().down_count; | 509 | s64 cycles_down = Core::CPU().down_count; |
| 510 | if (max_idle != 0 && cycles_down > max_idle) | 510 | if (max_idle != 0 && cycles_down > max_idle) |
| 511 | cycles_down = max_idle; | 511 | cycles_down = max_idle; |
| 512 | 512 | ||
| 513 | if (first && cycles_down > 0) { | 513 | if (first && cycles_down > 0) { |
| 514 | s64 cycles_executed = g_slice_length - Core::AppCore().down_count; | 514 | s64 cycles_executed = g_slice_length - Core::CPU().down_count; |
| 515 | s64 cycles_next_event = first->time - global_timer; | 515 | s64 cycles_next_event = first->time - global_timer; |
| 516 | 516 | ||
| 517 | if (cycles_next_event < cycles_executed + cycles_down) { | 517 | if (cycles_next_event < cycles_executed + cycles_down) { |
| @@ -526,9 +526,9 @@ void Idle(int max_idle) { | |||
| 526 | cycles_down / (float)(g_clock_rate_arm11 * 0.001f)); | 526 | cycles_down / (float)(g_clock_rate_arm11 * 0.001f)); |
| 527 | 527 | ||
| 528 | idled_cycles += cycles_down; | 528 | idled_cycles += cycles_down; |
| 529 | Core::AppCore().down_count -= cycles_down; | 529 | Core::CPU().down_count -= cycles_down; |
| 530 | if (Core::AppCore().down_count == 0) | 530 | if (Core::CPU().down_count == 0) |
| 531 | Core::AppCore().down_count = -1; | 531 | Core::CPU().down_count = -1; |
| 532 | } | 532 | } |
| 533 | 533 | ||
| 534 | std::string GetScheduledEventsSummary() { | 534 | std::string GetScheduledEventsSummary() { |