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

Port DeSmuME to GTK+ 3.24 #368

Merged
merged 26 commits into from Sep 9, 2020
Merged

Port DeSmuME to GTK+ 3.24 #368

merged 26 commits into from Sep 9, 2020

Conversation

linkmauve
Copy link
Collaborator

@linkmauve linkmauve commented Sep 4, 2020

My end goal is GTK 4 support, but this seems like a good first step.

I’ve also added a meson build system, as it’s much more developer-friendly than autotools, and is getting widely adopted.

Please test the various features, amongst known broken is the recent file list (but you can use the recent file opener in the GTK+ open dialog).

I have only tested on Linux, but I see no reason it wouldn’t work elsewhere too, especially since meson supports Visual Studio.

Amongst my future plans for this GUI are:

  • Port it to GTK 4, as said above.
  • Reformat the code, probably using clang-format.
  • Split the menu and GtkBuilder strings out in other files, possibly using GResource to keep them inside of the final executable.
  • Replace the GLX context with a GtkGLArea, so that it works on Wayland without requiring Xwayland.
  • Upgrade SDL to SDL2, for the same reason.

Fixes part of #209.

All deprecation warnings are disabled for now, they will be reenabled at
a later point.
At this point, this version builds.  It is full of deprecated widgets
and functions though, which will have to be cleaned over time.  It also
doesn’t display any visuals in the DS emulation part yet.
The expose_event signal has been renamed draw.
At this point we got a fully (?) functional gtk3 port, but it uses a ton
of deprecated functions that will be removed in gtk4.  Better enable the
warnings so that we know what to fix before then.
If we want to change the style of a widget, we should use CSS nowadays.
This one uses the native file chooser the user is used to, which can be
GTK’s on Linux but a more familiar one on other OSes.  If
xdg-desktop-portal is installed, it can even use the DE’s native one on
Linux.
This will make it possible to use GAction to replace the deprecated
GtkAction and GtkToggleAction and such.
@zeromus
Copy link
Contributor

zeromus commented Sep 4, 2020

Nobody is going to test a fork, you will have to push it to master for anyone to test it. Then the test will be in the form of people reporting regressions as github bugs. So fix the bugs you know about and then I'll merge it.

This is now using an action parameter to send the slot to save to/load
from.

There was a previous comment about Shift-Fn being broken and a
workaround using Key_Press(), but it doesn’t seem to be broken anymore
so we can use the accelerators instead and remove a static variable.
This now only uses GtkRecentManager to populate the menu.
@linkmauve
Copy link
Collaborator Author

Here, quick savestate access from the menu, as well as recent files are now working properly.

I believe this could get merged now.

@zeromus zeromus merged commit 5dd62b2 into TASEmulators:master Sep 9, 2020
@linkmauve linkmauve deleted the gtk3 branch September 9, 2020 21:21
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

2 participants