DolphinQt: Improve Gecko code download failure message

This commit is contained in:
Simonx22
2026-02-28 11:12:15 -05:00
parent 1a08708a75
commit d2e381090c
4 changed files with 18 additions and 13 deletions

View File

@@ -190,11 +190,10 @@ Java_org_dolphinemu_dolphinemu_features_cheats_model_GeckoCheat_downloadCodes(JN
{
const std::string gametdb_id = GetJString(env, jGameTdbId);
bool success = true;
const std::vector<Gecko::GeckoCode> codes = Gecko::DownloadCodes(gametdb_id, &success);
if (!success)
const auto codes_result = Gecko::DownloadCodes(gametdb_id);
if (!codes_result)
return nullptr;
const std::vector<Gecko::GeckoCode>& codes = *codes_result;
const jobjectArray array =
env->NewObjectArray(static_cast<jsize>(codes.size()), IDCache::GetGeckoCheatClass(), nullptr);