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

Core: Avoid (Some) Global System Accessor #12648

Merged
merged 1 commit into from Mar 22, 2024

Conversation

mitaclaw
Copy link
Contributor

Part 1 of an effort to remove global state from one of the biggest offenders.

@AdmiralCurtiss
Copy link
Contributor

While I'm not entirely sure what your end goal looks like here (and frankly, even I'm not entirely sure how the Host <-> System interaction will end up looking by the end), I suppose this is fine for reducing the global accessor a bit.

@mitaclaw
Copy link
Contributor Author

mitaclaw commented Mar 22, 2024

The end goal will be not a single Core::System::GetInstance() call in Core.cpp, and I am confident I can get it done. Other than Core::DisplayMessage, I have the whole plan mapped out to completion. It will mean Core::System::GetInstance() calls appearing in a few new files, but the idea is to gradually expose what components currently assume these functions are free to call (thus don't properly have access to System), and work forward from there.

@AdmiralCurtiss AdmiralCurtiss merged commit f8fdaf9 into dolphin-emu:master Mar 22, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants