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

(Wayland): support wp_fractional_scale_v1 #15355

Closed
wants to merge 1 commit into from

Conversation

wakira
Copy link

@wakira wakira commented Jun 5, 2023

Description

Introduce wp_fractional_scale_v1 protocol for proper fractional scaling under wayland.

For compositors supporting wp_fractional_scale_v1, RetroArch is now pixel-accurate when using a non-integer scale.

Tested using KDE 5.27.5

@LibretroAdmin LibretroAdmin marked this pull request as ready for review June 7, 2023 19:10
@wakira wakira changed the title WIP: (Wayland): support wp_fractional_scale_v1 (Wayland): support wp_fractional_scale_v1 Jun 13, 2023
Copy link
Contributor

@ColinKinloch ColinKinloch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should apply the same scaling to active_touch_positions.

@wakira
Copy link
Author

wakira commented Sep 2, 2023

You should apply the same scaling to active_touch_positions.

fixed

@ColinKinloch
Copy link
Contributor

I just tested it on gnome desktop and it seems to work fine.
Just a nitpick, I feel that the fractional_scale_num variables should just be fractional_scale.

@wakira
Copy link
Author

wakira commented Sep 2, 2023

Just a nitpick, I feel that the fractional_scale_num variables should just be fractional_scale.

The reasoning is that while buffer_scale is just the integer scale factor (1 for 1x, 2 for 2x ...), the fractional one is different (120 for 1x, 180 for 1.5x ...). I think similar names (buffer_scale and fractional_scale) might be error-prune.

I'm fine with just fractional_scale if that is not a concern.

@ColinKinloch
Copy link
Contributor

The sent scale is the numerator of a fraction with a denominator of 120.

https://wayland.app/protocols/fractional-scale-v1#wp_fractional_scale_v1:event:preferred_scale

Yeah, it's okay. So long as num is short for numerator. 😄

@ColinKinloch
Copy link
Contributor

@LibretroAdmin
This works well. It also still seems to rebase without conflicts.

@zoltanvb
Copy link
Contributor

May we have this? :) Although I could not apply the patch version any more to current RA code, so maybe it is again a merge conflict that is not visible here.
https://github.com/wakira/RetroArch/commit/3c9a2f4fc3dbd7d9af96b9ff8dcb56a10bcd446a.patch/

zoltanvb added a commit to zoltanvb/RetroArch that referenced this pull request Nov 29, 2023
A rebase of earlier PR libretro#15355
No changes added (except for one log).
LibretroAdmin pushed a commit that referenced this pull request Nov 30, 2023
A rebase of earlier PR #15355
No changes added (except for one log).
@wakira wakira closed this Mar 5, 2024
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 this pull request may close these issues.

None yet

3 participants