mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 21:00:06 +00:00
core_timing: Allow configuring a fixed or random initial system tick value. (#7309)
* core_timing: Apply random base ticks value on startup. * core: Maintain consistent base system ticks in TAS movies. * frontend: Add setting to configure a fixed base system ticks value.
This commit is contained in:
parent
96aa1b3a08
commit
0165012ba4
14 changed files with 150 additions and 17 deletions
|
@ -185,7 +185,7 @@ public:
|
|||
|
||||
class Timer {
|
||||
public:
|
||||
Timer();
|
||||
Timer(s64 base_ticks = 0);
|
||||
~Timer();
|
||||
|
||||
s64 GetMaxSliceLength() const;
|
||||
|
@ -249,7 +249,7 @@ public:
|
|||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
explicit Timing(std::size_t num_cores, u32 cpu_clock_percentage);
|
||||
explicit Timing(std::size_t num_cores, u32 cpu_clock_percentage, s64 override_base_ticks = -1);
|
||||
|
||||
~Timing(){};
|
||||
|
||||
|
@ -290,6 +290,9 @@ public:
|
|||
event_queue_locked = false;
|
||||
}
|
||||
|
||||
/// Generates a random tick count to seed the system tick timer with.
|
||||
static s64 GenerateBaseTicks();
|
||||
|
||||
private:
|
||||
// unordered_map stores each element separately as a linked list node so pointers to
|
||||
// elements remain stable regardless of rehashes/resizing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue