early-access version 2945
This commit is contained in:
parent
55844e3d08
commit
0281449da2
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2944.
|
This is the source code for early-access 2945.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -76,8 +76,18 @@ static constexpr char BanListMagic[] = "YuzuRoom-BanList-1";
|
|||||||
static constexpr char token_delimiter{':'};
|
static constexpr char token_delimiter{':'};
|
||||||
|
|
||||||
static void PadToken(std::string& token) {
|
static void PadToken(std::string& token) {
|
||||||
const auto remainder = token.size() % 3;
|
std::size_t outlen = 0;
|
||||||
for (size_t i = 0; i < (3 - remainder); i++) {
|
|
||||||
|
std::array<unsigned char, 512> output{};
|
||||||
|
std::array<unsigned char, 2048> roundtrip{};
|
||||||
|
for (size_t i = 0; i < 3; i++) {
|
||||||
|
mbedtls_base64_decode(output.data(), output.size(), &outlen,
|
||||||
|
reinterpret_cast<const unsigned char*>(token.c_str()),
|
||||||
|
token.length());
|
||||||
|
mbedtls_base64_encode(roundtrip.data(), roundtrip.size(), &outlen, output.data(), outlen);
|
||||||
|
if (memcmp(roundtrip.data(), token.data(), token.size()) == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
token.push_back('=');
|
token.push_back('=');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,8 @@ public:
|
|||||||
setData(game_name, GameNameRole);
|
setData(game_name, GameNameRole);
|
||||||
if (!smdh_icon.isNull()) {
|
if (!smdh_icon.isNull()) {
|
||||||
setData(smdh_icon, GameIconRole);
|
setData(smdh_icon, GameIconRole);
|
||||||
|
} else {
|
||||||
|
setData(QIcon::fromTheme(QStringLiteral("chip")).pixmap(32), GameIconRole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user