aboutsummaryrefslogtreecommitdiff
path: root/multimedia/munt/system_rom_path.diff
blob: 3cc1e2933813efad505274ceffb2c2f06f5486c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/README.txt munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/README.txt
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/README.txt	2022-08-03 11:39:49.000000000 -0400
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/README.txt	2023-04-11 14:52:33.660273547 -0400
@@ -29,7 +29,7 @@
 mt32d and xmt32 will be installed to /usr/local/bin
 
 Please ensure that the ROM files are installed in 
-/usr/share/mt32-rom-data
+/usr/share/munt/roms
 
 If the ROM files are correctly installed yet the 
 program cannot open them, check the filenames (case sensitive) 
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/alsadrv.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/alsadrv.cpp
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/alsadrv.cpp	2022-08-03 11:39:49.000000000 -0400
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/alsadrv.cpp	2023-04-11 14:54:40.209261637 -0400
@@ -44,7 +44,7 @@
 FILE *recwav_file = NULL;
 
 #define PERC_CHANNEL  9 
-const char default_rom_dir[] = "/usr/share/mt32-rom-data/";
+const char default_rom_dir[] = "/usr/share/munt/roms/";
 
 #include <mt32emu/mt32emu.h>
 
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/console.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/console.cpp
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/console.cpp	2022-08-03 11:39:49.000000000 -0400
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/console.cpp	2023-04-11 14:54:09.900264489 -0400
@@ -139,7 +139,7 @@
 
 	printf("\n");
 	printf("-f romdir    : Directory with ROM files to load\n"
-	       "               (default: '/usr/share/mt32-rom-data/')\n");
+	       "               (default: '/usr/share/munt/roms/')\n");
 	printf("-o romsearch : Search algorithm to use when loading ROM files:\n"
 	       "               (0 - try both but CM32-L first, 1 - CM32-L only,\n"
 	       "                2 - MT-32 only, default: 0)\n");
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/xmt32.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/xmt32.cpp
--- munt-mt32emu_qt_1_11_1/mt32emu_alsadrv/src/xmt32.cpp	2022-08-03 11:39:49.000000000 -0400
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_alsadrv/src/xmt32.cpp	2023-04-11 14:53:38.143267478 -0400
@@ -489,7 +489,7 @@
 
 	printf("\n");
 	printf("-f romdir    : Directory with ROM files to load\n"
-	       "               (default: '/usr/share/mt32-rom-data/')\n");
+	       "               (default: '/usr/share/munt/roms/')\n");
 	printf("-o romsearch : Search algorithm to use when loading ROM files:\n"
 	       "               (0 - try both but CM32-L first, 1 - CM32-L only,\n"
 	       "                2 - MT-32 only, default: 0)\n");
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_qt/src/Master.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_qt/src/Master.cpp
--- munt-mt32emu_qt_1_11_1/mt32emu_qt/src/Master.cpp	2022-08-03 11:39:49.000000000 -0400
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_qt/src/Master.cpp	2023-04-11 14:56:27.938251499 -0400
@@ -583,20 +583,7 @@
 }
 
 QString Master::getDefaultROMSearchPath() {
-#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
-	QString defaultPath;
-	QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
-	if (env.contains("USERPROFILE")) {
-		defaultPath = env.value("USERPROFILE");
-	} else if (env.contains("HOME")) {
-		defaultPath = env.value("HOME");
-	} else {
-		defaultPath = ".";
-	}
-	return defaultPath + "/roms/";
-#else
-	return "./roms/";
-#endif
+	return "/usr/share/munt/roms/";
 }
 
 void Master::loadSynthProfile(SynthProfile &synthProfile, QString name) {
diff -Naur munt-mt32emu_qt_1_11_1/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp munt-mt32emu_qt_1_11_1.patched/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp
--- munt-mt32emu_qt_1_11_1/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp	2022-08-03 11:39:49.000000000 -0400
+++ munt-mt32emu_qt_1_11_1.patched/mt32emu_smf2wav/src/mt32emu-smf2wav.cpp	2023-04-11 14:56:27.938251499 -0400
@@ -917,7 +917,7 @@
 
 static bool loadROMs(MT32Emu::Service &service, const Options &options) {
 	const char *romDirNameUtf8 = options.romDir;
-	if (romDirNameUtf8 == NULL) romDirNameUtf8 = ".";
+	if (romDirNameUtf8 == NULL) romDirNameUtf8 = "/usr/share/munt/roms";
 	char *romDirName = g_filename_from_utf8(romDirNameUtf8, strlen(romDirNameUtf8), NULL, NULL, NULL);
 	GDir *romDir = g_dir_open(romDirName, 0, NULL);
 	if (NULL == romDir) {