-
Notifications
You must be signed in to change notification settings - Fork 1
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
Linux? #17
Comments
Thanks a lot for sharing your code, mainly for the gui part, and the Core code organization, extremely interesting ! I'm mostly using Linux, and work at something completely different, it would be great to have a working port on Linux too. FYI, I tested the Windows version on Linux, using wine64, and it works fine ( ~ 62 fps)). Readind the code, I think I have understood what is missing (mostly the open file binding), but I don't see anything blocking the port. => If nobody else beats me, and I can find some time, I'll create the missing tree, and I'll try to make it compile and work on Linux too** :-) Just be patient ;-) ** x86_64 / Debian like / SDL2 / Open GL / gtk 2.x Edit: typos + missing information |
Hey, thanks for taking the time to test this under Wine! You've hit it right in the ballpark when it comes to the only thing breaking portability, being the OpenFileDialog() functions. I opted to use the platform specific ones for Windows and MacOS, but it shouldn't be too hard to follow the pattern and add the Linux function to the open_file_dialog headers. If you've got the time I'd say go for it. I think it would be awesome to have a Linux release as well! |
Ok ... I got it working on Linux (Intel x86_64 for the moment), but I don't have the time to commit anything, and I'd prefer test in private first. Is there a way to contact you in private ? (e.g. by email ?) ... and to send you the full thing ? Currently : I can open all the roms provided with the repository (not tested the sound though), without issue, even the Left/Right ALT work nicely. The little issue I found is the fullscreen mode : we should add a delay in the loop, because it can sometimes be difficult to toggle fullscreen/window mode. The reason : the loop is far too fast, and add some SDL_Delay() after toggleFullscreen/ window mode, should be a nice workaround. Though, got no idea about the sound (I'm not rom specialist, sorry ;-) The "file open" implementation uses the simple nativefiledialog from https://github.com/mlabbe/nativefiledialog (see https://github.com/mlabbe/nativefiledialog/blob/master/LICENSE for the license). Important: in fact, I'm using gtk-3 ... apologies (I announced gtk-2) Edit : typos |
More simple => I finaly forked your tree, and you can test directly. |
Thanks for sharing the native_file_dialog library. I had no idea that existed! I'm not sure I'm following you about the full-screen toggling issue though. Hitting the 'enter' key or clicking the corresponding GUI button toggles to full-screen or back without any issues on Windows and MacOS for me (and it feels very responsive as well!) The main emulator loop already uses SDL_Delay() to keep the program going at about 60Hz. Adding a delay after toggling full-screen (or anywhere else, to be honest) would mess up the timing and create an apparent "stutter" in the emulated game (although that would be reasonable since the user is in fact toggling to full-screen). I personally like having the feeling of a "quick" full-screen change. In other words I would prefer to not have it feel "sluggish" on purpose. Maybe I misunderstood what you were saying. Any chance you could clarify? |
You're welcome :-) As I wrote, I learned a lot reading your code. Back to the fullscreen issue, the loop is probably too fast on Linux. I didn't test enough to tell more. As workaround, I'm hiting a second key while typing Enter. This slows down the SDL loop, and it works most of the time. |
Nice, looks good so far! I will definitely use some of this and I'll be happy to add your name and contribution on the next release. Again, not sure when I'll get around to testing and polishing all of it, but this has been a huge help 👍 . Ah, I see what your saying about the fullscreen toggling issue. Yea it sounds like something funky might be going on behind the scenes with SDL_GetTicks() on Linux.. I'll need to look into that some more. Im glad my code could help you out with whatever project you're working on, best of luck, and thanks again! |
I'll get to it eventually.
The text was updated successfully, but these errors were encountered: