System: Pack state in struct

Don't trust the linker...
This commit is contained in:
Stenzek 2024-10-27 22:44:22 +10:00
parent 166c930738
commit d34707a377
No known key found for this signature in database
2 changed files with 589 additions and 553 deletions

File diff suppressed because it is too large Load Diff

View File

@ -90,7 +90,7 @@ enum : TickCount
MASTER_CLOCK = 44100 * 0x300 // 33868800Hz or 33.8688MHz, also used as CPU clock MASTER_CLOCK = 44100 * 0x300 // 33868800Hz or 33.8688MHz, also used as CPU clock
}; };
enum class State enum class State : u8
{ {
Shutdown, Shutdown,
Starting, Starting,
@ -99,7 +99,7 @@ enum class State
Stopping, Stopping,
}; };
enum class BootMode enum class BootMode : u8
{ {
None, None,
FullBoot, FullBoot,
@ -121,8 +121,6 @@ enum class Taint : u8
MaxCount, MaxCount,
}; };
extern TickCount g_ticks_per_second;
/// Returns true if the path is a PlayStation executable we can inject. /// Returns true if the path is a PlayStation executable we can inject.
bool IsExePath(std::string_view path); bool IsExePath(std::string_view path);
@ -184,11 +182,6 @@ const char* GetTaintName(Taint taint);
bool HasTaint(Taint taint); bool HasTaint(Taint taint);
void SetTaint(Taint taint); void SetTaint(Taint taint);
ALWAYS_INLINE TickCount GetTicksPerSecond()
{
return g_ticks_per_second;
}
ALWAYS_INLINE_RELEASE TickCount ScaleTicksToOverclock(TickCount ticks) ALWAYS_INLINE_RELEASE TickCount ScaleTicksToOverclock(TickCount ticks)
{ {
if (!g_settings.cpu_overclock_active) if (!g_settings.cpu_overclock_active)
@ -211,6 +204,7 @@ ALWAYS_INLINE_RELEASE TickCount UnscaleTicksToOverclock(TickCount ticks, TickCou
return t; return t;
} }
TickCount GetTicksPerSecond();
TickCount GetMaxSliceTicks(); TickCount GetMaxSliceTicks();
void UpdateOverclock(); void UpdateOverclock();