summaryrefslogtreecommitdiff
path: root/games-emulation/desmume/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /games-emulation/desmume/files
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'games-emulation/desmume/files')
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff11
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11-gcc6.patch47
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11-gcc7.patch21
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11_p20210409-fix-gtk-cliopts.patch91
4 files changed, 91 insertions, 79 deletions
diff --git a/games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff b/games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff
deleted file mode 100644
index 8975085133ff..000000000000
--- a/games-emulation/desmume/files/desmume-0.9.11-fix-pointer-conversion-warning.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/path.h 2015-02-14 16:05:26.000000000 +0100
-+++ b/src/path.h 2016-07-11 12:09:59.591987169 +0200
-@@ -375,7 +375,7 @@
- else if (strchr(strftimeArgs, *p))
- {
- char tmp[MAX_PATH];
-- char format[] = { '%', *p, NULL };
-+ char format[] = { '%', *p, '\0' };
- strftime(tmp, MAX_PATH, format, time_struct);
- file.append(tmp);
- }
diff --git a/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch b/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch
deleted file mode 100644
index 761ccef045cf..000000000000
--- a/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/src/wifi.cpp
-+++ b/src/wifi.cpp
-@@ -314,9 +314,9 @@
-
- #if (WIFI_LOGGING_LEVEL >= 1)
- #if WIFI_LOG_USE_LOGC
-- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__);
-+ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__);
- #else
-- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__);
-+ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__);
- #endif
- #else
- #define WIFI_LOG(level, ...) {}
---- a/src/MMU_timing.h
-+++ b/src/MMU_timing.h
-@@ -155,8 +155,8 @@
- enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };
- enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };
- enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };
-- enum { TAGMASK = (u32)(~0 << TAGSHIFT) };
-- enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };
-+ enum { TAGMASK = (u32)(~0U << TAGSHIFT) };
-+ enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };
- enum { WORDSIZE = sizeof(u32) };
- enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };
- enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };
---- a/src/ctrlssdl.cpp
-+++ b/src/ctrlssdl.cpp
-@@ -200,7 +200,7 @@
- break;
- case SDL_JOYAXISMOTION:
- /* Dead zone of 50% */
-- if( (abs(event.jaxis.value) >> 14) != 0 )
-+ if( ((u32)abs(event.jaxis.value) >> 14) != 0 )
- {
- key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1);
- if (event.jaxis.value > 0) {
-@@ -370,7 +370,7 @@
- Note: button constants have a 1bit offset. */
- case SDL_JOYAXISMOTION:
- key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1);
-- if( (abs(event->jaxis.value) >> 14) != 0 )
-+ if( ((u32)abs(event->jaxis.value) >> 14) != 0 )
- {
- if (event->jaxis.value > 0)
- key_code |= 1;
diff --git a/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch b/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch
deleted file mode 100644
index 8b8a67f2291a..000000000000
--- a/games-emulation/desmume/files/desmume-0.9.11-gcc7.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Bug: https://bugs.gentoo.org/646352
-Patch: https://sources.debian.org/data/main/d/desmume/0.9.11-3/debian/patches/gcc7_fixes.patch
-
-From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001
-From: rogerman <rogerman@users.sf.net>
-Date: Mon, 17 Aug 2015 21:15:04 +0000
-Subject: Fix bug with libfat string handling.
-
-diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.cpp
-index 765d7ae5..b6d7f01f 100644
---- a/src/utils/libfat/directory.cpp
-+++ b/src/utils/libfat/directory.cpp
-@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len
- int bytes;
- size_t count = 0;
-
-- while (count < len-1 && src != '\0') {
-+ while (count < len-1 && *src != '\0') {
- bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps);
- if (bytes > 0) {
- *dst = (ucs2_t)tempChar;
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),