Compare commits

..

1 Commits

Author SHA1 Message Date
Jordan Woyak
cd5dde9940
Merge bc40d943bb into 2ff3a7215b 2025-08-30 01:40:23 -03:00
8 changed files with 4 additions and 37 deletions

View File

@ -174,15 +174,6 @@ void AddCode(ARCode code)
}
}
size_t CountEnabledCodes()
{
if (!Config::AreCheatsEnabled())
return 0;
std::lock_guard guard(s_lock);
return s_active_codes.size();
}
void LoadAndApplyCodes(const Common::IniFile& global_ini, const Common::IniFile& local_ini,
const std::string& game_id, u16 revision)
{

View File

@ -50,7 +50,6 @@ void SetSyncedCodesAsActive();
void UpdateSyncedCodes(std::span<const ARCode> codes);
std::vector<ARCode> ApplyAndReturnCodes(std::span<const ARCode> codes);
void AddCode(ARCode new_code);
size_t CountEnabledCodes();
void LoadAndApplyCodes(const Common::IniFile& global_ini, const Common::IniFile& local_ini,
const std::string& game_id, u16 revision);

View File

@ -203,8 +203,8 @@ private:
EventType* m_ev_lost = nullptr;
CPUThreadConfigCallback::ConfigChangedCallbackID m_registered_config_callback_id;
float m_config_oc_factor = 1.0f;
float m_config_oc_inv_factor = 1.0f;
float m_config_oc_factor = 0.0f;
float m_config_oc_inv_factor = 0.0f;
bool m_config_sync_on_skip_idle = false;
s64 m_throttle_reference_cycle = 0;

View File

@ -50,15 +50,6 @@ static std::vector<GeckoCode> s_active_codes;
static std::vector<GeckoCode> s_synced_codes;
static std::mutex s_active_codes_lock;
size_t CountEnabledCodes()
{
if (!Config::AreCheatsEnabled())
return 0;
std::lock_guard guard(s_active_codes_lock);
return s_active_codes.size();
}
void SetActiveCodes(std::span<const GeckoCode> gcodes, const std::string& game_id, u16 revision)
{
std::lock_guard lk(s_active_codes_lock);

View File

@ -60,7 +60,6 @@ constexpr u32 HLE_TRAMPOLINE_ADDRESS = INSTALLER_END_ADDRESS - 4;
// preserve the emulation performance.
constexpr u32 MAGIC_GAMEID = 0xD01F1BAD;
size_t CountEnabledCodes();
void SetActiveCodes(std::span<const GeckoCode> gcodes, const std::string& game_id, u16 revision);
void SetSyncedCodesAsActive();
void UpdateSyncedCodes(std::span<const GeckoCode> gcodes);

View File

@ -454,7 +454,7 @@ private:
u32 m_even_field_last_hl = 0; // index last halfline of the even field
u32 m_odd_field_last_hl = 0; // index last halfline of the odd field
float m_config_vi_oc_factor = 1.0f;
float m_config_vi_oc_factor = 0.0f;
Config::ConfigChangedCallbackID m_config_changed_callback_id;
Core::System& m_system;

View File

@ -28,7 +28,7 @@ constexpr u16 LegalNitroChannelMask = 0b0011'1111'1111'1110u;
u16 SelectWifiChannel(u16 enabled_channels_mask, u16 current_channel)
{
const Common::BitSet<u16> enabled_channels(enabled_channels_mask & LegalChannelMask);
const Common::BitSet<u16> enabled_channels{enabled_channels_mask & LegalChannelMask};
u16 next_channel = current_channel;
for (int i = 0; i < 16; ++i)
{

View File

@ -35,7 +35,6 @@
#include "Core/PowerPC/MMU.h"
#include "Core/PowerPC/PowerPC.h"
#include "Core/System.h"
#include "VideoCommon/OnScreenDisplay.h"
namespace PatchEngine
{
@ -201,18 +200,6 @@ void LoadPatches()
ActionReplay::LoadAndApplyCodes(globalIni, localIni, sconfig.GetGameID(),
sconfig.GetRevision());
}
const size_t enabled_patch_count =
std::ranges::count_if(s_on_frame, [](Patch patch) { return patch.enabled; });
if (enabled_patch_count > 0)
{
OSD::AddMessage(fmt::format("{} game patch(es) enabled", enabled_patch_count),
OSD::Duration::NORMAL);
}
const size_t enabled_cheat_count = ActionReplay::CountEnabledCodes() + Gecko::CountEnabledCodes();
if (enabled_cheat_count > 0)
OSD::AddMessage(fmt::format("{} cheat(s) enabled", enabled_cheat_count), OSD::Duration::NORMAL);
}
static void ApplyPatches(const Core::CPUThreadGuard& guard, const std::vector<Patch>& patches)