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

Remove configuration coupling to GUI #4786

Merged
merged 23 commits into from
Oct 2, 2021
Merged

Remove configuration coupling to GUI #4786

merged 23 commits into from
Oct 2, 2021

Conversation

stenzek
Copy link
Member

@stenzek stenzek commented Sep 18, 2021

Description of Changes

This pull requests moves a bunch of configuration options from AppConfig to the base config class, reducing coupling from the emulator core to the GUI.

Long term (imo) everything should be moved to a single ini, but for now I've maintained the old behaviour of saving the different areas to different inis, so that existing settings don't break.

The PCSX2_CORE define relates to the remainder of the decoupling work - it enables PCSX2 to be compiled without anything in the gui/ directory, which will be needed for us to develop a Qt frontend. The reverse of the macro is used to maintain the current wx frontend behavior.

Memory cards and save states have been moved from the GUI to the emulator core. Save state compression has also been refactored, ditching the persistent thread (which gets removed anyway) for std::thread.

FMV switching has also been partially rewritten and simplified. HostKeyEvent has been added so that the pad classes don't need to pull in App.h, although this is a complete mess anyway (particularly for Linux).

The next thing I want to move is GS, and get rid of GSApp. But there's a lot of options here and risk for regressions, so I'm leaving that for a separate PR.

Rationale behind Changes

Making the emulator core dependent on the GUI is bad.

Suggested Testing Steps

There's quite a few things touched here, so it'll need testing in a few areas:

  • Making sure existing configurations don't break.
  • Making sure FMV switching isn't broken.
  • Making sure no pad functionality has been broken.

@RedDevilus
Copy link
Contributor

Might be a good time to update the copyright header dates as well.

@JordanTheToaster
Copy link
Contributor

I've found no issues with it including loading an old config on Windows just needs a rebase now.

@MrCK1
Copy link
Member

MrCK1 commented Sep 29, 2021

I ran through the PR yesterday and tried a variety of setting changes. Loading old config seems to work as expected, there were no issues applying settings ect.

@JordanTheToaster
Copy link
Contributor

Tested again and everything seems golden on Windows.

@stenzek
Copy link
Member Author

stenzek commented Sep 30, 2021

A note for if/when this gets merged; you'll probably want to squash it, there were some commits in the middle where custom paths were broken. They're fine in the final commit obviously, but it could be an issue for bisecting in the future if it's not squashed.

@Mrlinkwii
Copy link
Contributor

Mrlinkwii commented Sep 30, 2021

everything seems fine here on linux 👍

@refractionpcsx2
Copy link
Member

Custom paths being broken at some point isn't really a big deal, I'd rather have the history there to go through the commits and deal with the possibly broken feature that I doubt any of us are using for 5 minutes to find a bug, than to have to guess an entire PR's worth of stuff where the bug is :P

@tadanokojin tadanokojin merged commit a41ec42 into PCSX2:master Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants