Qt: Fix Games Not Launching on the Correct Display When Rendering to Main#14292
Qt: Fix Games Not Launching on the Correct Display When Rendering to Main#14292jasaaved wants to merge 1 commit intoPCSX2:masterfrom
Conversation
|
Just to confirm, the combination of "Render to Separate Window" and "Start Fullscreen" already works for you? |
Yes. |
Interesting... |
Digging further, it may be due to us not setting a window size (either with setGeometry or resize). Are you able to see if setting the window size (i,e. with setGeometry so we can set position at the same time) fixes the issue instead of create()? |
I'll try this out once I'm back on my pc later tonight. Also, is screen() supposed to be called that way? Shouldn't it be m_display_surface->screen()? That could be the fix, but I can't test it right now. |
|
I removed create() and replace setPosition() with setGeometry and that has seemed to fixed it. I will be pushing it soon. Testing it a bit more to make sure it didn't break anything. Render to a separate window still works just like before. I need to update the title of this PR though. It wasn't just an exclusive fullscreen issue. It was happening with borderless fullscreen as well, I just didn't test it. The main issue was rendering to the main window, not exclusive/borderless. |
|
setGeometry has been pushed. While testing, I did discover another bug. It's not caused by setGeometry because it happens on the nightly build as well. Make sure rendering to main is on and start fullscreen is off, fullscreen after the game launches. A new window is made, so there are two windows. One for main and the other for the game even though it is supposed to render to main. I don't think that is intentional. That fix is probably for another PR though. |
Replace setPosition with setGeometry. This makes sure when rendering to main window, it stays on the current display the main window is currently positioned at.
2a56e16 to
63ed9c2
Compare
That's interesting. I don't see that behavior. Maybe monitor or driver dependent? I would look into it further and try other things, but I can't replicate it. My screen turns black briefly when exiting exclusive fullscreen. Commits have been squashed. |
Description of Changes
Replace setPosition with setGeometry. This makes sure when rendering to main window, it stays on the current display the main window is currently positioned at.
Rationale behind Changes
This fixes the bug where rendering to main a game would launch on the primary monitor instead of the monitor that is currently on. Not everyone may need this fix (see comments under #14289 ). Before testing, make sure your multi-monitor setup needs this fix.
Suggested Testing Steps
Did you use AI to help find, test, or implement this issue or feature?
No.