Add support for arbitrary scaling ratios in hybrid display mode#192
Open
pickledish wants to merge 5 commits intolibretro:masterfrom
Open
Add support for arbitrary scaling ratios in hybrid display mode#192pickledish wants to merge 5 commits intolibretro:masterfrom
pickledish wants to merge 5 commits intolibretro:masterfrom
Conversation
pickledish
commented
Jun 29, 2023
Comment on lines
-86
to
+91
| unsigned int touch_scale = screen_layout_data.displayed_layout == ScreenLayout::HybridBottom ? screen_layout_data.hybrid_ratio : 1; | ||
| unsigned int touch_scale = 1; | ||
| if (screen_layout_data.displayed_layout == ScreenLayout::HybridBottom) { | ||
| touch_scale = screen_layout_data.hybrid_ratio_large; | ||
| } else if (screen_layout_data.displayed_layout == ScreenLayout::HybridTop) { | ||
| touch_scale = screen_layout_data.hybrid_ratio_small; | ||
| } |
Author
There was a problem hiding this comment.
(see the PR description, this edit makes sense to me but must be wrong somehow. Before this edit, the touch registers but not where you touched, and after this edit the touch doesn't register at all)
Author
|
Any way to get eyes on this? If the PR is too long to be desirable / no one can help with the small bug that remains, I can remove the 3:2 option and just add the 4:1 one, that would require only a few lines total to be changed and would still be an improvement |
|
I'm also bumping this as the new wave of Android handhelds will greatly benefit from having separate, customizable integer scaling for each screen, rather than just a fixed list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! New to this project but saw a small place I could make an improvement so wanted to take a stab.
Yesterday I found myself needing a few more options in the "hybrid ratio" section of the core options; in my specific case options like 4:1 or 3:2 would be nice to have since they'd result in both screens being integer-scaled on the 720p steam deck display (and also 1440p and 4k displays I believe).
Adding an option for 4:1 ratio was easy, just a new item in the menu, but 3:2 was much harder since the code assumes the "small screen" in a hybrid display is always ratio 1. Thus, this PR! I tried to add support (though please be nice if my C is terrible, haven't needed to try it since high school 😅)
Here are a few screenshots showing it works (zoom in to see those perfect pixels lol):
The 4:1 mode works perfectly, but I think I must've gotten something slightly wrong with the input part, since touch doesn't register in the 3:2 mode when the bottom screen is the small screen -- would love any input or help y'all can provide!
Thanks :)