yuzu: Move compatibility list specifics to their own source files
Lets us keep the generic portions of the compatibility list code together, and allows us to introduce a type alias that makes it so we don't need to type out a very long type declaration anymore, making the immediate readability of some code better.
This commit is contained in:
parent
9238015dd4
commit
230edc8c7c
10 changed files with 55 additions and 31 deletions
18
src/citra_qt/compatibility_list.cpp
Normal file
18
src/citra_qt/compatibility_list.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2018 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "citra_qt/compatibility_list.h"
|
||||
|
||||
CompatibilityList::const_iterator FindMatchingCompatibilityEntry(
|
||||
const CompatibilityList& compatibility_list, u64 program_id) {
|
||||
return std::find_if(compatibility_list.begin(), compatibility_list.end(),
|
||||
[program_id](const auto& element) {
|
||||
std::string pid = fmt::format("{:016X}", program_id);
|
||||
return element.first == pid;
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue