fix(libretro): correct touch cursor in Hybrid (Focus Bottom) layouts#305
Open
DaVinciLord wants to merge 1 commit into
Open
fix(libretro): correct touch cursor in Hybrid (Focus Bottom) layouts#305DaVinciLord wants to merge 1 commit into
DaVinciLord wants to merge 1 commit into
Conversation
OpenGL placed the cursor in UV space on the bottom half of the output texture, which did not match hybrid layouts. Software rendering always used the secondary touch-screen matrix. Use ConsoleTouchPosition (same as nds.TouchScreen) and the hybrid or bottom matrix as appropriate; draw the cursor in framebuffer pixels in the fragment shader, or use the same transformed bounds as OpenGL in software. Fixes: JesseTG#288 Closes: JesseTG#240
Owner
|
Thanks for your contribution! I'll test this personally and will merge it if I don't find any problems. |
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.
I experienced at least one of the issues mentioned when trying to play with RetroArch on my linux desktop, so I decided to help a little with these issues.
Keep in mind, that the code was AI-Generated as I am not well versed with C++, OpenGL or shaders.
However, the test suite was run in my local environment and passed. Also, manual testing on my setup with alternating layout and renderer (Software/OpenGL) was performed as well and passed for me.
If this does not get merged, I understand and will take any feedback to help improve my knowledge and collaboration. 😄
Summary
gl_FragCoord/uScreenSize) instead of a UV heuristic on the bottom half of the texture.ConsoleTouchPosition()(same coordinates sent to the emulator) and hybrid vs bottom matrix depending on layout and “show opposite screen”.touch ± cursorSizecorners (same as OpenGL), instead of transformed center + buffer-space offset that was wrong under hybrid.GetHybridScreenMatrix()and plumbConsoleTouchPosition()throughInputState.Issues
Testing