-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
USB: Dual Cursor Lightgun #12697
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
base: master
Are you sure you want to change the base?
USB: Dual Cursor Lightgun #12697
Conversation
|
Thanks for the PR! ❤️ It seems to work fine for me with any renderer but GL, when using GL I'm getting a crash on game start: |
|
@bslenul Can you create a gs dump with a renderer that works where it would crash and post it here? |
|
Sure, this is with "Automatic" (so VK in my case): gun-gs-dump.zip The dump loads fine with all renderers expect GL (as long as I use at least 1 PNG as a crosshair). |
lightningterror
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UpdateSoftwareCursorTexture has to run on the GS thread for thread safety, otherwise it causes race conditions on OpenGL where you create texture without a valid context. All GL API calls must happen on the GS thread.
Try
if (MTGS::IsOpen())
{
MTGS::RunOnGSThread([index]() {
UpdateSoftwareCursorTexture(index);
});
}
|
Can confirm, no more crash with GL with that change! 👍 |
Argh, no more crash but now P2 cursor doesn't always appear again. |
Yup, if you have both crosshairs images with that fix in, it just reverts behaviour. Only shows first player crosshair and before showed both. |
|
Is this also related to #4472 |
This doesn't touch firewire and iLink, those are just stubbed aka placebo files in the codes still so we don't do that functionality. It's just visual indicators for custom crosshairs which doesn't affect in-game parts. |
Ahh I see, thank you |
|
With the latest changes PCSX2 hangs for me with custom crosshair PNG when launching a game in Big Picture mode. |
There seems to be an issue with how the MTGS handles the enumeration and drawing, updating for the replaced crosshairs icons that the users provides like in a .png format. Master would be random but tends to only show USB Device 1 crosshair. But now 2 at same time should work. Hopefully gets rid of PCSX2#11423
TheLastRar: ' This issue of the missing P2 cursor seems to be caused because the GS (and thus MTGS) gets reset shortly after USBopen, causing the command to get dropped. Putting MTGS::WaitGS() at the end of this function (after the closing bracket for MTGS::RunOnGSThread()) seems enough to fix this.' Didn't see where it lost the textures before but I did identify it was happening on the MTGS thread somehow. If you uncommented it, it did work but then you get issues with OpenGL renderer.
FSUI waits on itself when switching/launching games in gamelist section but fine in Qt version.
4078ad6 to
c334784
Compare




Description of Changes
There seems to be an issue with how the MTGS handles the enumeration and drawing, updating for the replaced crosshairs icons that the users provides like in a .png format. Master would be random but tends to only show USB Device 1 crosshair. But now 2 at same time should work. Hopefully gets rid of #11423



Rationale behind Changes
The niche lightgun users also using niche dual replaced icons was certainly a bug as you get ghost inputs if not the texture was carefully drawn.
Suggested Testing Steps
Normal games work, but best in any game that uses GunCon2 aka lightgun games.
Did you use AI to help find, test, or implement this issue or feature?
No, this mess is my own.