diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2021-06-01 07:59:05 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2021-06-01 22:22:32 -0400 |
commit | a7478e660bb64d23fb8790cd93567f898ff0d314 (patch) | |
tree | 0a9a5b89441d3bb897469ad97e142d8a4478c5a1 /games-emulation/desmume/files | |
parent | games-emulation/desmume: add github remote-id (diff) | |
download | gentoo-a7478e660bb64d23fb8790cd93567f898ff0d314.tar.gz gentoo-a7478e660bb64d23fb8790cd93567f898ff0d314.tar.bz2 gentoo-a7478e660bb64d23fb8790cd93567f898ff0d314.zip |
games-emulation/desmume: add 0.9.11_p20210409 snapshot
Upstream labels their stable 0.9.11 release as '(do not use)'
and is missing 6 years worth of changes, they instead suggest
to use current git autobuilds.
Current hasn't changed in some time and should be a fair
snapshot (not that it isn't without some issues, included patch
to fix cli option issues with gtk+:3 port).
Removes gtk+:2 and migrates to meson / gtk+:3 / libsdl2.
USE=gui enabled by default because the cli version is very
limited and more useful for debugging.
Closes: https://bugs.gentoo.org/701138
Closes: https://github.com/gentoo/gentoo/pull/20947
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-emulation/desmume/files')
-rw-r--r-- | games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch b/games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch new file mode 100644 index 000000000000..f773385748af --- /dev/null +++ b/games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch @@ -0,0 +1,91 @@ +Fix unusable command line options since GTK+:3 migration. + +https://github.com/TASVideos/desmume/pull/416 +From: Ingo Saitz <Ingo.Saitz@stud.uni-hannover.de> +Date: Sun, 3 Jan 2021 16:00:38 +0100 +--- a/desmume/src/commandline.cpp ++++ b/desmume/src/commandline.cpp +@@ -41,7 +41,8 @@ + , _load_to_memory(-1) +-, _play_movie_file(0) +-, _record_movie_file(0) +-, _cflash_image(0) +-, _cflash_path(0) +-, _gbaslot_rom(0) ++, nds_file("") ++, play_movie_file("") ++, record_movie_file("") ++, cflash_image("") ++, cflash_path("") ++, gbaslot_rom("") + , _bios_arm9(NULL) +@@ -60,4 +61,4 @@ + , _texture_smooth(-1) +-, _slot1(NULL) +-, _slot1_fat_dir(NULL) ++, slot1("") ++, slot1_fat_dir("") + , _slot1_fat_dir_type(false) +@@ -68,3 +69,3 @@ + #endif +-, _console_type(NULL) ++, console_type("") + , _advanscene_import(NULL) +@@ -360,4 +361,4 @@ + case OPT_SLOT2_CFLASH_IMAGE: cflash_image = optarg; break; +- case OPT_SLOT2_CFLASH_DIR: _cflash_path = optarg; break; +- case OPT_SLOT2_GBAGAME: _gbaslot_rom = optarg; break; ++ case OPT_SLOT2_CFLASH_DIR: cflash_path = optarg; break; ++ case OPT_SLOT2_GBAGAME: gbaslot_rom = optarg; break; + +@@ -520,4 +521,5 @@ + +- if((_cflash_image && _gbaslot_rom) || (_cflash_path && _gbaslot_rom)) { ++ if((cflash_image != "" && gbaslot_rom != "") || (cflash_path != "" && gbaslot_rom != "")) { + printerror("Cannot specify both cflash and gbaslot rom (both occupy SLOT-2)\n"); ++ return false; + } +--- a/desmume/src/commandline.h ++++ b/desmume/src/commandline.h +@@ -88,7 +88,2 @@ + private:
+- char* _play_movie_file;
+- char* _record_movie_file;
+- char* _cflash_image;
+- char* _cflash_path;
+- char* _gbaslot_rom;
+ char* _bios_arm9, *_bios_arm7;
+@@ -109,5 +104,2 @@ + #endif
+- char* _slot1;
+- char *_slot1_fat_dir;
+- char* _console_type;
+ char* _advanscene_import;
+--- a/desmume/src/frontend/posix/gtk/main.cpp ++++ b/desmume/src/frontend/posix/gtk/main.cpp +@@ -3555,12 +3555,9 @@ + +-static void +-handle_open(GApplication *application, +- GFile **files, +- gint n_files, +- const gchar *hint, ++static gint ++ignore_command_line(GApplication *application, ++ GApplicationCommandLine *command_line, + gpointer user_data) + { +- configured_features *my_config = static_cast<configured_features*>(user_data); +- my_config->nds_file = g_file_get_path(files[0]); + common_gtk_main(application, user_data); ++ return 0; + } +@@ -3584,6 +3581,5 @@ + +- // TODO: pass G_APPLICATION_HANDLES_COMMAND_LINE instead. +- GtkApplication *app = gtk_application_new("org.desmume.DeSmuME", G_APPLICATION_HANDLES_OPEN); ++ GtkApplication *app = gtk_application_new("org.desmume.DeSmuME", G_APPLICATION_HANDLES_COMMAND_LINE); + g_signal_connect (app, "activate", G_CALLBACK(common_gtk_main), &my_config); +- g_signal_connect (app, "open", G_CALLBACK(handle_open), &my_config); ++ g_signal_connect (app, "command-line", G_CALLBACK(ignore_command_line), &my_config); + g_action_map_add_action_entries(G_ACTION_MAP(app), |