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

Wide/Ultra Wide screen shaking issue #3333

Closed
BlisterB opened this issue Jan 18, 2025 · 7 comments · Fixed by #3334
Closed

Wide/Ultra Wide screen shaking issue #3333

BlisterB opened this issue Jan 18, 2025 · 7 comments · Fixed by #3334

Comments

@BlisterB
Copy link
Member

In the game "A tale of Yu - Onsen RPG":

When enabling Wide Screen or Ultra Wide Screen in options (F1 > Video), the screen is extremely shaky, or completely broken.
Both on windowed and full screen mode.

The video below just capture a fraction of the bug (too much shaky to be recorded).

Enregistrement.2025-01-18.162513.mp4
@BlisterB BlisterB changed the title Wide/Ultra Wide screen shaking Wide/Ultra Wide screen shaking issue Jan 18, 2025
@BlisterB
Copy link
Member Author

As you can see here, things are drawn outside of the border of the map.

Image

@BlisterB
Copy link
Member Author

Here, the map is not centered

Image

@BlisterB
Copy link
Member Author

All these issues are present in the continuous build. But absent in a build from January 2024, so it's likely a regression introduced in the meantime.

@Ghabry
Copy link
Member

Ghabry commented Jan 18, 2025

Thanks for the report. That looks strange.
Whether this will be fixed before 0.8.1 depends on how hard this will be to bisect (and fix)

@BlisterB
Copy link
Member Author

After some testings, it concerns every games, when the map is shorter than the screen.

@Ghabry Ghabry added this to the 0.8.1 milestone Jan 19, 2025
@Ghabry
Copy link
Member

Ghabry commented Jan 19, 2025

This bug was actually already reported on January 12 via Mail with Video attached on Android. I concluded that its a bug with the video driver (it looked like a Vsync bug I had on WiiU) and they responded that altering the frame limit fixed it...

Looking at the logfile the Player was set to widescreen.


This is bad. My first guess was a fix for Beloved Rapture when the width/height is not a multiple of the tile size and I was right:

e7767ff

The bug is moving from std::min/max to std::clamp which doesn't work here because map_width - screen_width can be negative, making it an invalid upper bound (smaller than the lower bound).

(Currently testing this on Windows where it directly triggers an assert in the debugger. On Linux it silently accepts the wrong arguments, awesome)

@BlisterB
Copy link
Member Author

I've quickly tested the build from #3334 and it seems to solve the issue. 👍
I will stick with this build to detect potential problems. 👍

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

Successfully merging a pull request may close this issue.

2 participants