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

Please reintroduce GTK2 support. #680

Open
TCH68k opened this issue Nov 7, 2020 · 6 comments
Open

Please reintroduce GTK2 support. #680

TCH68k opened this issue Nov 7, 2020 · 6 comments

Comments

@TCH68k
Copy link

TCH68k commented Nov 7, 2020

While GTK3 is indeed widespread, it is far from stable. Maybe it's stable on Linux x86, but what about the other architectures and OS-es?
Not mentioning the speed; GTK3 programs are unusable on an older or weaker machine such as the RPi B+. Nowadays a lot of ARM SBC-based "retroconsoles" are coming out and on those, GTK3 is not really fast.

Please consider the reintroduction of GTK2 support. If there are features which cannot be implemented under GTK2, that is okay, just disable them if the user is not compiling against GTK3.

@keithbowes
Copy link
Contributor

That's probably a tall order, if you're not willing to write the GTK 2 code yourself. I'm not sure, but I suspect this has to do with the use of gtkmm, which perhaps provides less of a way to conditionally compile between GTK 2 and GTK 3 (or maybe they just couldn't be bothered to test between two different gtkmm versions).

People who can't run the GTK 3 UI have two options as far as I see it:

  1. Use an older version that still has a GTK 2 UI. Those are still available; in fact, at the time of writing, the latest is 1.60, which is still possible to compile with GTK 2.
  2. Use a different port. The GTK 3 port works better for me than the Unix port, but perhaps it would be the reverse for those that just have X but no GTK 3. I myself mostly use the libretro port, which works fine without GTK or any graphics server at all. Though I am one of those Linux x86 users you refer to; YMMV on RPi or other devices.

@TCH68k
Copy link
Author

TCH68k commented Dec 20, 2020

I know, that the latest stable is still has GTK2. I've already fetched the last GTK2-compatible beta too. If nothing else, i will stick to 1.60.

I'll try this libretro stuff. Is there any tutorials or manual pages which covers how to build snes9x with it?

@bearoso
Copy link
Collaborator

bearoso commented Dec 20, 2020

GTK 3 isn't hurting performance. The actual emulator output circumvents GTK and draws directly with OpenGL or Cairo.

@TCH68k
Copy link
Author

TCH68k commented Dec 21, 2020

Perhaps it does not impact the emulator's performance directly, but GTK3 itself impacts the entire system's performance. Not an issue on a strong x86_64 machine, but it is on a weak ARM SBC or on a very old PC. And if the system itself begins to lag, then the emulator will lag too.

I tried to build the libretro version in the libretro subdir, but apparently that dir is for windows, or at least i think, because the "msvc" files.

However inside the "unix" dir, snes9x still builds and works, but of course no GUI. But is it compatible with the config files of the GTK version? If it is, then maybe i'll stick with the UNIX one, without the GUI and build a "configurator" for it.

@bearoso
Copy link
Collaborator

bearoso commented Dec 21, 2020

GTK 3 can't affect system performance the way you describe. The backend is glib, shared with GTK 2, and the graphics backend is Cairo, also shared with GTK 2. The only difference then is the theme engine, which won't make a difference unless you're running settings or something, because Snes9x draws directly. It stays completely out of the way during emulation.

I think you need to try the GTK 2 and GTK 3 builds of Snes9x 1.60 and compare them. You'll see there's no performance difference.

The libretro subdirectory isn't just for windows. You just need to run make there. Though you shouldn't do that. Instead, download the Snes9x core from the RetroArch core updater.

@TCH68k
Copy link
Author

TCH68k commented Dec 21, 2020

I tried GTK3 programs on ARM SBC-s and old PowerMacs and they were much more slower than their almost identical (as in: one release older) counterparts. An example: Synaptic 0.75 was the last GTK2 version and when i tried the new GTK3 one, it was much more slower.
I am not questioning that GTK3 does not interfere with the emulation, i am only saying that a GTK3 GUI itself eats up a lot of CPU on a weak machine. Also GTK3 is very buggy, it tends to make windows "blinking" (perhaps due to slow draw?) and sometimes it crashes. That's what i've mentioned in the OP, that it may be somewhat stable on x86, but what about other archs?

I've already tried to just run make in the libretro dir when i asked about it in my last post, but it did not work, that's why i assumed that i tried to compile a windows port or something like that.
Strangely, now i tried it again and now it worked. I don't know what was the problem last time. I've got a snes9x_libretro.so shared object. I guess it's a plugin. I've checked this RetroArch which could use this, but it's nearly 40 MB. snes9x is only 2 MB. Do i really need to install and run a 40 MB framework, when the standalone emulator is only 2 MB?

I think i'd rather try to use the "unix" version. Can it use the very same "snes9x.conf" as the GTK2 version?

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

No branches or pull requests

3 participants