pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

[BUG]: Per-game controller option still lingers

Open unixatch opened this issue 1 year ago • 7 comments

Describe the Bug

After commit 27fb7dc26efba332fd52c2fe9a6275added38ec2, controller settings are broken.

~~Before it was possible to change controller settings on the fly, it was easier to do Per-game controller settings modifications since it was just enabling a toggle and change them immediately.~~

Also now if these settings are changed in Big Picture, they won't even actually change in-game, even loading the profile, restarting or closing the game does nothing.

The transition to the new system also isn't smooth: I had to get an older version, create the controller profiles, swap to the new version and then load the new profile

Reproduction Steps

~~No more on the fly changes:~~ ~~1. Load a game;~~ ~~2. Go in Big Picture in the quick menu;~~ ~~3. Try changing any inputs without loading or saving a profile;~~ ~~4. Nothing changes;~~

Trying to use the new method:

  1. Load a game;
  2. Go in Big Picture in the quick menu;
  3. Go in game's properties;
  4. Select the game's profile in "Input Profile" inside informations;
  5. It doesn't use it, restarting or on the fly, it doesn't matter;

Expected Behavior

It should work just like before for on the fly changes and actually load the profile too

PCSX2 Revision

v2.1.120

Operating System

macOS 12 (Monterey)

If Linux - Specify Distro

No response

Logs & Dumps

No response

unixatch avatar Sep 01 '24 04:09 unixatch

That was the entire point. This isn't a regression, this is a fix for an issue which has been plaguing Big Picture for a very long time. You can read up on the explanation of why in the PR.

RedPanda4552 avatar Sep 01 '24 04:09 RedPanda4552

I found the actual issue here:

the bug? (The image showcases the solution) Those settings still do their old job, that is they weren't really removed fully so it used those old ones in [Pad1] like you can see in the image instead of the new profiles I created.

A pop-up saying that the setting has been deprecated like some others options do should be displayed at the very least.

unixatch avatar Sep 01 '24 08:09 unixatch

Reproduced - despite VMManager no longer loading the controls using the interface to game properties, the standard global interface is still having the entries from the game properties file injected into it. This one will take some time to figure out.

RedPanda4552 avatar Sep 04 '24 17:09 RedPanda4552

Reproduced - despite VMManager no longer loading the controls using the interface to game properties, the standard global interface is still having the entries from the game properties file injected into it. This one will take some time to figure out.

I found maybe the issue thanks to GitHub's search feature:

https://github.com/PCSX2/pcsx2/blob/28e4b10fdab8615d131ee065d9422588f15de621/pcsx2/VMManager.cpp#L940-L944

unixatch avatar Sep 04 '24 18:09 unixatch

Wow okay, Visual Studio is just really, really terrible. Imagine that... Alright this clues me in, thanks. Will look at this when I have a pinch more time.

RedPanda4552 avatar Sep 04 '24 19:09 RedPanda4552

Messing around with this a bit - because it is a "destructive" change, best I can do is fix the issue with a lingering setting for per-game controls blocking profiles. That much works.

However, what I cannot seem to work out is how then per-game controls lingering in the ini manage to overlap with the shared profile. For that, really all I can offer is:

  1. From here out, anyone moving forward won't have the issue of controls getting stuck in their game properties in the first place
  2. Anyone who does have them stuck can remove them the same way we've been having to tell people all this time, go in and cut the pad section out of any game properties files

Is it elegant? No. But are there many other options here? Doesn't seem like it, unless we want to hard code something into PCSX2 to say "if pad then stop loading"... Which, for a thing which technically no longer exists, feels wrong.

RedPanda4552 avatar Sep 08 '24 06:09 RedPanda4552

Anyone who does have them stuck can remove them the same way we've been having to tell people all this time, go in and cut the pad section out of any game properties files

Is it elegant? No. But are there many other options here? Doesn't seem like it, unless we want to hard code something into PCSX2 to say "if pad then stop loading"... Which, for a thing which technically no longer exists, feels wrong.

You could do like how it's been done with 2 other options, If it isn't time consuming and it's possible.

Here's a pic: signal-2024-09-08-19-11-01-818

It shows up when you right-click on the game, select "Properties..." and then it pops up.

I found some references here: https://github.com/PCSX2/pcsx2/blob/7d6f74083ba656f7de0a6a2148be4851bf987620/pcsx2-qt/Settings/GraphicsSettingsWidget.cpp#L323-L341

And here: https://github.com/PCSX2/pcsx2/blob/7d6f74083ba656f7de0a6a2148be4851bf987620/pcsx2/Pcsx2Config.cpp#L1855-L1860

unixatch avatar Sep 08 '24 17:09 unixatch