azahar/src/common/hacks/hack_manager.cpp
OpenSauce 9abcb4d520
Fix various build issues (#572)
Co-authored-by: PabloMK7 <hackyglitch2@gmail.com>
2025-02-27 22:02:33 +00:00

22 lines
727 B
C++

// Copyright Citra Emulator Project / Azahar Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include <algorithm>
#include "hack_manager.h"
namespace Common::Hacks {
const HackEntry* HackManager::GetHack(const HackType& type, u64 title_id) {
auto range = entries.equal_range(type);
for (auto it = range.first; it != range.second; it++) {
auto tid_found = std::find(it->second.affected_title_ids.begin(),
it->second.affected_title_ids.end(), title_id);
if (tid_found != it->second.affected_title_ids.end()) {
return &it->second;
}
}
return nullptr;
}
} // namespace Common::Hacks