You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
// If the multi-threaded GS thread is open, update the cursor's texture to reflect the new image (example is a crosshair.png) or scale (size)
1156
-
// This is necessary for rendering the crosshair correctly
1157
+
// This is necessary for rendering the crosshair correctly.
1158
+
// Also, need to make it run on the GSthread to ensure thread safety or OpenGL renderer will have race conditions due to not creating texture without a valid accompanying context.
1157
1159
if (MTGS::IsOpen())
1158
-
UpdateSoftwareCursorTexture(index);
1160
+
{
1161
+
MTGS::RunOnGSThread([index]() {
1162
+
UpdateSoftwareCursorTexture(index);
1163
+
});
1164
+
}
1159
1165
1160
1166
// If showing or hiding the cursor for Player 1 (index 0), update the host mouse mode
1161
1167
// This synchronizes the system cursor visibility with the software cursor
1162
1168
// Basically hides the system cursor when we activate a software cursor.
// }); // Corresponding closing bracket for MTGS::RunOnGSThread on top of this function which commented out but is here in case we need to bring it back
1172
+
});
1173
+
MTGS::WaitGS(); // 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. See https://github.com/PCSX2/pcsx2/pull/12697
0 commit comments