-
-
Notifications
You must be signed in to change notification settings - Fork 172
Port keymapper to SDL renderer #2763
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
Conversation
Window reusing is done in a hackish way, adding new renderers will break the mapper. Handle with care.
Awesome overhaul and function improvement.
The functional chunks of code are made more readable. |
fc6e572
to
37d75f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff @GranMinigun! These changes improve readability a lot too. 🎉
No comments from me as the days of the old mapper are numbered, like you mentioned. We only need to keep it limping along for a bit longer. In a way it got a lot more love from you than it deserves 😎
(On a related note, glad to see you returning to our circles, man. I've been missing you, your graphics pipeline related insights, and the snarky remarks 😎🤘🏻 )
👍 Scaling perfectly to various DPIs on Linux and macOS: |
@GranMinigun @kcgen Ok, that merging was a bit premature, so it seems. I can open the mapper fine on macOS and the coordinate mappings work fine, so it's fully functional. But the Exit button does not hide it, so once opened, I'm stuck with it. |
Shall I create a regression ticket for this @GranMinigun or are looking into it? This broke the mapper in main at least on macOS. |
I'm not sure how you're unable to exit from the mapper. Definitely cannot reproduce here. No need for a separate ticket, it can be discussed here. |
@GranMinigun Works fine on Windows 10 🥶 SDL... 😐 This is a bit of a problem because you don't have a Mac... I guess it will be @kklobe, @kcgen or myself who fixes it. Any suggestions are welcome. I've done some quick tracing, and |
Sorry for merging too soon. Been offline, but will check it out tomorrow and see what you think, @GranMinigun. |
Two things to check: whether other renderer backends work (e.g. |
That's it @GranMinigun; results from macos: This exits the mapper properly: output = opengl
texture_renderer = opengl These also exit properly: output = texture
texture_renderer = (all: metal, software, opengles2, opengl) However these don't: output = opengl
texture_renderer = metal, opengles2, or software The |
Alright, I see software renderer outright crashes on my side. Will think about what to do and raise a follow-up PR. |
Does what it says: moves mapper from software surface to SDL's rendering API. The emulator window is now reused instead of creating a new one.
If you're not happy with the mapper's pseudo-lambdas and how they're formatted, you're welcome to steal this branch. These changes would go far beyond the scope of the PR though, and the whole thing will be eventually rewritten anyway, hence why I'm leaving it as is.
While it seems to work with the surface output, this is not intentional, and it will be removed in a subsequent PR anyway. (Damn, that sounds broken...)
Extracted from - and is a prerequisite to - #2450. Closes #2237.