Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Add graphics mods support to GUI #10885

Merged
merged 5 commits into from Jul 26, 2022

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Jul 23, 2022

Because PR #10518 (graphics mods) was merged right before the previous progress report, I didn't have time to make graphics mods available in the Android GUI in time before the progress report. But let's get it merged in time for the next progress report, shall we?

Patches, AR codes and Gecko codes have an associated code that the GUI
can show, but graphics mods don't.
ReadOnlyCheat will be used by graphics mods.

for (GraphicsModConfig& mod : mod_group->GetMods())
{
// Group only mods shouldn't be shown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of me wonders if we should add a IsModVisibleInUI(const std::set<std::string>& groups) function to be used in Qt and Android. Unlikely to add more visibility features but if it was needed, it would be in one place.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed some redundant empty checks instead. The code now feels short enough that it might be fine to just leave it duplicated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works. Thanks!

Java_org_dolphinemu_dolphinemu_features_cheats_model_GraphicsModGroup_load(JNIEnv* env, jclass,
jstring jGameId)
{
auto* config = new GraphicsModGroupConfig(GetJString(env, jGameId));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, what cleans up these raw pointers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java_org_dolphinemu_dolphinemu_features_cheats_model_GraphicsModGroup_finalize.

@JosJuice JosJuice force-pushed the android-graphics-mods branch 2 times, most recently from 52b2b63 to ba13ce6 Compare July 23, 2022 19:57
@JosJuice JosJuice merged commit 9710029 into dolphin-emu:master Jul 26, 2022
11 checks passed
@JosJuice JosJuice deleted the android-graphics-mods branch July 26, 2022 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants