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

Window size restarts on closing #14317

Closed
JaegerFox opened this issue Mar 25, 2021 · 12 comments · Fixed by #14329
Closed

Window size restarts on closing #14317

JaegerFox opened this issue Mar 25, 2021 · 12 comments · Fixed by #14329
Milestone

Comments

@JaegerFox
Copy link

JaegerFox commented Mar 25, 2021

What happens?

Every time I start a game and close PPSSPP the "window size scale" preset stops working
The scale at which it resets takes up the entire screen.

What should happen?

In previous versions 1.9.x it kept the scale of the window when closing PPSSPP in any way, in 1.10 for the first time it presented these problems

What are you using?

Windows 8.1
Intel HD Graphics
using the last nigthly
I thought this problem was common, I looked and did not find something similar, I do not know if it is something related to my hardware. but in version 1.9.3 it works as it should

-This bug can be reproduced by opening a game, wait a bit and close PPSSPP, reopen it and the window size will restart. If this does not happen just try a few more times

@anr2me
Copy link
Collaborator

anr2me commented Mar 25, 2021

Are you using D3D ?

Not sure if this is related or not...
I experiencing random windows size almost every time i launched multiple-instance of Debug build of PPSSPP on D3D11, although it rarely happened on Release build but there might be some issue with D3D (didn't happened on vulkan/opengl)
Something like this: (usually happened on the 2nd instance, but the 1st instance can get similar issue too sometimes)
image
it's actually goes down further, but from the position(which is random position too) of the window, the screenshot is truncated to the desktop bottom.
The actual windows height seems to be the height of my desktop, but the width seems to be the width of 1x PSP Window (which is correct since i use Window 1x size)

Sometimes it just reset to default windows size the next time i launched PPSSPP, even tho i always set it to Window 1x size the last time i closed down PPSSPP.

How to reproduce this:
1). Run Debug build to trigger this issue more often
2). Use D3D11 backend and set Window to 1x and close down PPSSPP
3). Run a couple of PPSSPP and see if this issue occurred or not. (doesn't need to run any game)
4). if it didn't get triggered, close down all PPSSPP, and try to launch a couple of it again (sooner or later it will occurred)

@JaegerFox
Copy link
Author

JaegerFox commented Mar 25, 2021

@anr2me
This happens to me in D3D9/11 and OGL
and only one instance at a time, I guess it will also happen if I use multiple instances

@unknownbrackets
Copy link
Collaborator

Do you have some window manager software? For example, I use an ultrawide monitor and specifically avoided its window management software to avoid bugs like this.

I've never seen PPSSPP resize my window unexpectedly, although I don't generally use game-specific settings (and the rare times I do, the window size is not something I customize.) Is it perhaps related to that?

I can't think of anything new in v1.10.x that would cause this, but the above are my best guesses.

-[Unknown]

@JaegerFox
Copy link
Author

JaegerFox commented Mar 29, 2021

@unknownbrackets I do not use any of that kind of software, even so it is weird that only this happens in the new versions

Here a short video..

window.bug.mp4

@anr2me
Copy link
Collaborator

anr2me commented Mar 29, 2021

I also didn't use window manager software, similar to that video but sometimes the width is correctly set to 1x Window while the height is about the height of my desktop, which making it looks weird.
And in my case it only happened on D3D with Debug build, i haven't been getting this issue on Release build.

The first time i found this issue was when i was implementing multi-instance, back then i thought the settings got currupted when closing down multiple PPSSPP nearly at the same time, and then you guys made it not to save settings on the 2nd or more instances (which i thought fixed this issue, but apparently because i wasn't using D3D anymore)
But recently, i just noticed it started to shows up again when i use D3D11, so i suspect it has something to do with D3D (i haven't been using D3D for a long time, and started to use it again because i started to feels annoyed with how often vulkan to caught assert exception while debugging)

@anr2me
Copy link
Collaborator

anr2me commented Mar 29, 2021

Btw which part of the code should i put breakpoint to find out whether the window's width and height arguments are correctly set or not when the first time PPSSPP window appeared ?

@unknownbrackets
Copy link
Collaborator

This happens in SetWindowSize() within MainWindow.cpp, but also DetermineWindowRectangle().

Does it help to remove the SavePosition(); call right below RECT rc = DetermineWindowRectangle();? I'm not sure why it's there, hwndMain doesn't exist yet. Maybe it's something related to that...

-[Unknown]

@anr2me
Copy link
Collaborator

anr2me commented Mar 29, 2021

After removing that SavePosition(); below RECT rc = DetermineWindowRectangle(); and tested 10 times of running 2x instances, this issue didn't seems to appear anymore.

@JaegerFox
Copy link
Author

But with me appears just using one instance
by the way where I can find that build fix? @anr2me

@anr2me
Copy link
Collaborator

anr2me commented Mar 30, 2021

Okay i'll create the PR so you can download it from the artifact

anr2me added a commit to anr2me/ppsspp that referenced this issue Mar 30, 2021
@anr2me
Copy link
Collaborator

anr2me commented Mar 30, 2021

@JaegerFox you can download the artifact from that PR later to test it
Here is the one for Win 64bit https://github.com/hrydgard/ppsspp/pull/14329/checks?check_run_id=2223650293

@JaegerFox
Copy link
Author

@anr2me definitely that solved the problem, I tried to close and reopen PPSSPP several times and in all it keep the window size
Thanks for your attention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants