aboutsummaryrefslogtreecommitdiff
path: root/emulators/higan/files
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2017-04-10 13:17:17 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2017-04-10 13:17:17 +0000
commitb7dda5b4c0b9ca7c2da1181e418308fc05462b25 (patch)
treeb1faf88729a6ba9335b53123ed40cd6a037d6217 /emulators/higan/files
parent8f7efa27a22abfe0e7998e3636b65fc76855978c (diff)
Notes
Diffstat (limited to 'emulators/higan/files')
-rw-r--r--emulators/higan/files/patch-higan_target-tomoko_GNUmakefile (renamed from emulators/higan/files/patch-target-ethos-Makefile)14
-rw-r--r--emulators/higan/files/patch-higan_target-tomoko_presentation_presentation.cpp11
-rw-r--r--emulators/higan/files/patch-higan_target-tomoko_program_medium.cpp11
-rw-r--r--emulators/higan/files/patch-higan_target-tomoko_tomoko.cpp23
-rw-r--r--emulators/higan/files/patch-higan_target-tomoko_tomoko.hpp8
-rw-r--r--emulators/higan/files/patch-higan_target-tomoko_tools_cheat-database.cpp11
-rw-r--r--emulators/higan/files/patch-icarus_core_core.cpp33
-rw-r--r--emulators/higan/files/patch-icarus_icarus.cpp23
-rw-r--r--emulators/higan/files/patch-nall-platform.hpp11
-rw-r--r--emulators/higan/files/patch-ruby__video__glx.cpp31
-rw-r--r--emulators/higan/files/patch-target-ethos_general_presentation.cpp11
-rw-r--r--emulators/higan/files/patch-target-ethos_utility_utility.cpp11
12 files changed, 127 insertions, 71 deletions
diff --git a/emulators/higan/files/patch-target-ethos-Makefile b/emulators/higan/files/patch-higan_target-tomoko_GNUmakefile
index de0f4369168e..f5e4491554d4 100644
--- a/emulators/higan/files/patch-target-ethos-Makefile
+++ b/emulators/higan/files/patch-higan_target-tomoko_GNUmakefile
@@ -1,15 +1,15 @@
---- target-ethos/Makefile.orig 2014-01-13 05:26:29 UTC
-+++ target-ethos/Makefile
+--- higan/target-tomoko/GNUmakefile.orig 2016-01-14 03:20:56 UTC
++++ higan/target-tomoko/GNUmakefile
@@ -27,9 +27,9 @@ else ifeq ($(platform),linux)
ruby += audio.alsa audio.openal audio.oss audio.pulseaudio audio.pulseaudiosimple audio.ao
- ruby += input.udev input.sdl input.x
+ ruby += input.udev input.sdl input.xlib
else ifeq ($(platform),bsd)
-- ruby := video.glx
+- ruby += video.glx video.xv video.xshm video.sdl
- ruby += audio.openal audio.oss
-- ruby += input.x
-+ ruby := %%VIDEO%%
+- ruby += input.sdl input.xlib
++ ruby += %%VIDEO%%
+ ruby += %%AUDIO%%
+ ruby += %%INPUT%%
endif
- # phoenix
+ # ruby
diff --git a/emulators/higan/files/patch-higan_target-tomoko_presentation_presentation.cpp b/emulators/higan/files/patch-higan_target-tomoko_presentation_presentation.cpp
new file mode 100644
index 000000000000..bc30b6dc349c
--- /dev/null
+++ b/emulators/higan/files/patch-higan_target-tomoko_presentation_presentation.cpp
@@ -0,0 +1,11 @@
+--- higan/target-tomoko/presentation/presentation.cpp.orig 2017-01-13 17:52:31 UTC
++++ higan/target-tomoko/presentation/presentation.cpp
+@@ -278,7 +278,7 @@ auto Presentation::toggleFullScreen() ->
+ }
+
+ auto Presentation::loadShaders() -> void {
+- auto pathname = locate("Video Shaders/");
++ auto pathname = locateShared("Video Shaders/");
+
+ if(settings["Video/Driver"].text() == "OpenGL") {
+ for(auto shader : directory::folders(pathname, "*.shader")) {
diff --git a/emulators/higan/files/patch-higan_target-tomoko_program_medium.cpp b/emulators/higan/files/patch-higan_target-tomoko_program_medium.cpp
new file mode 100644
index 000000000000..6c898cd0f699
--- /dev/null
+++ b/emulators/higan/files/patch-higan_target-tomoko_program_medium.cpp
@@ -0,0 +1,11 @@
+--- higan/target-tomoko/program/medium.cpp.orig 2017-01-13 10:43:46 UTC
++++ higan/target-tomoko/program/medium.cpp
+@@ -17,7 +17,7 @@ auto Program::loadMedium() -> void {
+ auto Program::loadMedium(Emulator::Interface& interface, const Emulator::Interface::Medium& medium) -> void {
+ unloadMedium();
+
+- mediumPaths.append(locate({medium.name, ".sys/"}));
++ mediumPaths.append(locateShared({medium.name, ".sys/"}));
+
+ Emulator::audio.reset(2, audio->get(Audio::Frequency).get<uint>(44100));
+ inputManager->bind(emulator = &interface);
diff --git a/emulators/higan/files/patch-higan_target-tomoko_tomoko.cpp b/emulators/higan/files/patch-higan_target-tomoko_tomoko.cpp
new file mode 100644
index 000000000000..e3790ab98982
--- /dev/null
+++ b/emulators/higan/files/patch-higan_target-tomoko_tomoko.cpp
@@ -0,0 +1,23 @@
+--- higan/target-tomoko/tomoko.cpp.orig 2016-07-01 08:21:27 UTC
++++ higan/target-tomoko/tomoko.cpp
+@@ -4,6 +4,20 @@ unique_pointer<Audio> audio;
+ unique_pointer<Input> input;
+ Emulator::Interface* emulator = nullptr;
+
++auto locateShared(string name) -> string {
++ string location = {Path::program(), name};
++ if(inode::exists(location)) return location;
++
++ location = {Path::shared(), "higan/", name};
++ if(inode::exists(location)) return location;
++
++ location = {Path::config(), "higan/", name};
++ if(inode::exists(location)) return location;
++
++ directory::create({Path::local(), "higan/"});
++ return {Path::local(), "higan/", name};
++}
++
+ auto locate(string name) -> string {
+ string location = {Path::program(), name};
+ if(inode::exists(location)) return location;
diff --git a/emulators/higan/files/patch-higan_target-tomoko_tomoko.hpp b/emulators/higan/files/patch-higan_target-tomoko_tomoko.hpp
new file mode 100644
index 000000000000..4ba140a1b1d0
--- /dev/null
+++ b/emulators/higan/files/patch-higan_target-tomoko_tomoko.hpp
@@ -0,0 +1,8 @@
+--- higan/target-tomoko/tomoko.hpp.orig 2017-01-11 11:35:22 UTC
++++ higan/target-tomoko/tomoko.hpp
+@@ -18,4 +18,5 @@ extern Emulator::Interface* emulator;
+ #include "tools/tools.hpp"
+ #include "presentation/presentation.hpp"
+
++auto locateShared(string name) -> string;
+ auto locate(string name) -> string;
diff --git a/emulators/higan/files/patch-higan_target-tomoko_tools_cheat-database.cpp b/emulators/higan/files/patch-higan_target-tomoko_tools_cheat-database.cpp
new file mode 100644
index 000000000000..30fa5b7f3eee
--- /dev/null
+++ b/emulators/higan/files/patch-higan_target-tomoko_tools_cheat-database.cpp
@@ -0,0 +1,11 @@
+--- higan/target-tomoko/tools/cheat-database.cpp.orig 2016-05-03 22:40:39 UTC
++++ higan/target-tomoko/tools/cheat-database.cpp
+@@ -18,7 +18,7 @@ auto CheatDatabase::findCodes() -> void
+ if(!emulator) return;
+ auto sha256 = emulator->sha256();
+
+- auto contents = string::read(locate("cheats.bml"));
++ auto contents = string::read(locateShared("cheats.bml"));
+ auto document = BML::unserialize(contents);
+
+ for(auto cartridge : document.find("cartridge")) {
diff --git a/emulators/higan/files/patch-icarus_core_core.cpp b/emulators/higan/files/patch-icarus_core_core.cpp
new file mode 100644
index 000000000000..12973c5f573e
--- /dev/null
+++ b/emulators/higan/files/patch-icarus_core_core.cpp
@@ -0,0 +1,33 @@
+--- icarus/core/core.cpp.orig 2017-01-11 13:27:39 UTC
++++ icarus/core/core.cpp
+@@ -1,17 +1,17 @@
+ Icarus::Icarus() {
+- database.famicom = BML::unserialize(string::read(locate("Database/Famicom.bml")));
+- database.superFamicom = BML::unserialize(string::read(locate("Database/Super Famicom.bml")));
+- database.masterSystem = BML::unserialize(string::read(locate("Database/Master System.bml")));
+- database.megaDrive = BML::unserialize(string::read(locate("Database/Mega Drive.bml")));
+- database.pcEngine = BML::unserialize(string::read(locate("Database/PC Engine.bml")));
+- database.gameBoy = BML::unserialize(string::read(locate("Database/Game Boy.bml")));
+- database.gameBoyColor = BML::unserialize(string::read(locate("Database/Game Boy Color.bml")));
+- database.gameBoyAdvance = BML::unserialize(string::read(locate("Database/Game Boy Advance.bml")));
+- database.gameGear = BML::unserialize(string::read(locate("Database/Game Gear.bml")));
+- database.wonderSwan = BML::unserialize(string::read(locate("Database/WonderSwan.bml")));
+- database.wonderSwanColor = BML::unserialize(string::read(locate("Database/WonderSwan Color.bml")));
+- database.bsMemory = BML::unserialize(string::read(locate("Database/BS Memory.bml")));
+- database.sufamiTurbo = BML::unserialize(string::read(locate("Database/Sufami Turbo.bml")));
++ database.famicom = BML::unserialize(string::read(locateShared("Database/Famicom.bml")));
++ database.superFamicom = BML::unserialize(string::read(locateShared("Database/Super Famicom.bml")));
++ database.masterSystem = BML::unserialize(string::read(locateShared("Database/Master System.bml")));
++ database.megaDrive = BML::unserialize(string::read(locateShared("Database/Mega Drive.bml")));
++ database.pcEngine = BML::unserialize(string::read(locateShared("Database/PC Engine.bml")));
++ database.gameBoy = BML::unserialize(string::read(locateShared("Database/Game Boy.bml")));
++ database.gameBoyColor = BML::unserialize(string::read(locateShared("Database/Game Boy Color.bml")));
++ database.gameBoyAdvance = BML::unserialize(string::read(locateShared("Database/Game Boy Advance.bml")));
++ database.gameGear = BML::unserialize(string::read(locateShared("Database/Game Gear.bml")));
++ database.wonderSwan = BML::unserialize(string::read(locateShared("Database/WonderSwan.bml")));
++ database.wonderSwanColor = BML::unserialize(string::read(locateShared("Database/WonderSwan Color.bml")));
++ database.bsMemory = BML::unserialize(string::read(locateShared("Database/BS Memory.bml")));
++ database.sufamiTurbo = BML::unserialize(string::read(locateShared("Database/Sufami Turbo.bml")));
+ }
+
+ auto Icarus::error() const -> string {
diff --git a/emulators/higan/files/patch-icarus_icarus.cpp b/emulators/higan/files/patch-icarus_icarus.cpp
new file mode 100644
index 000000000000..311f0a0db489
--- /dev/null
+++ b/emulators/higan/files/patch-icarus_icarus.cpp
@@ -0,0 +1,23 @@
+--- icarus/icarus.cpp.orig 2017-01-11 13:07:07 UTC
++++ icarus/icarus.cpp
+@@ -4,6 +4,20 @@ using namespace nall;
+ #include <hiro/hiro.hpp>
+ using namespace hiro;
+
++auto locateShared(string name) -> string {
++ string location = {Path::program(), name};
++ if(inode::exists(location)) return location;
++
++ location = {Path::shared(), "icarus/", name};
++ if(inode::exists(location)) return location;
++
++ location = {Path::config(), "icarus/", name};
++ if(inode::exists(location)) return location;
++
++ directory::create({Path::local(), "icarus/"});
++ return {Path::local(), "icarus/", name};
++}
++
+ auto locate(string name) -> string {
+ string location = {Path::program(), name};
+ if(inode::exists(location)) return location;
diff --git a/emulators/higan/files/patch-nall-platform.hpp b/emulators/higan/files/patch-nall-platform.hpp
deleted file mode 100644
index 89c08865fbd3..000000000000
--- a/emulators/higan/files/patch-nall-platform.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- nall/platform.hpp.orig 2014-01-20 06:37:12 UTC
-+++ nall/platform.hpp
-@@ -41,7 +41,7 @@ namespace Math {
- #undef interface
- #define dllexport __declspec(dllexport)
- #else
-- #include <endian.h>
-+ #include <sys/endian.h>
- #include <unistd.h>
- #include <pwd.h>
- #define dllexport
diff --git a/emulators/higan/files/patch-ruby__video__glx.cpp b/emulators/higan/files/patch-ruby__video__glx.cpp
deleted file mode 100644
index 2030d21ec8cc..000000000000
--- a/emulators/higan/files/patch-ruby__video__glx.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
---- ruby/video/glx.cpp.orig 2014-01-20 06:37:14 UTC
-+++ ruby/video/glx.cpp
-@@ -128,6 +128,28 @@ struct pVideoGLX : OpenGL {
- //require GLX 1.2+ API
- if(glx.version_major < 1 || (glx.version_major == 1 && glx.version_minor < 2)) return false;
-
-+ int major, minor;
-+ const char *version = (const char *) glGetString (GL_VERSION);
-+ const char *dot = version == NULL ? NULL : strchr (version, '.');
-+ const char *major_start = dot;
-+
-+ /* Sanity check */
-+ if (dot == NULL || dot == version || *(dot + 1) == '\0') {
-+ major = 0;
-+ minor = 0;
-+ } else {
-+ /* Find the start of the major version in the string */
-+ while (major_start > version && *major_start != ' ')
-+ --major_start;
-+ major = strtol (major_start, NULL, 10);
-+ minor = strtol (dot + 1, NULL, 0);
-+ }
-+
-+ if(major < 3 || (major == 3 && minor < 2)) {
-+ printf("Error: OpenGL 3.2 is not available. Select another video driver on the Advanced Configuration tab and restart higan.\n");
-+ return false;
-+ }
-+
- XWindowAttributes window_attributes;
- XGetWindowAttributes(display, settings.handle, &window_attributes);
-
diff --git a/emulators/higan/files/patch-target-ethos_general_presentation.cpp b/emulators/higan/files/patch-target-ethos_general_presentation.cpp
deleted file mode 100644
index bd4a6d47f510..000000000000
--- a/emulators/higan/files/patch-target-ethos_general_presentation.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- target-ethos/general/presentation.cpp.orig 2013-12-06 20:19:40 UTC
-+++ target-ethos/general/presentation.cpp
-@@ -235,7 +235,7 @@ void Presentation::bootstrap() {
- void Presentation::loadShaders() {
- //only the OpenGL driver has video shader support
- if(config->video.driver == "OpenGL") {
-- string pathname = program->path("Video Shaders/");
-+ string pathname = program->path("shaders/");
- lstring shaders = directory::folders(pathname, "*.shader");
- for(auto& name : shaders) {
- auto shader = new RadioItem;
diff --git a/emulators/higan/files/patch-target-ethos_utility_utility.cpp b/emulators/higan/files/patch-target-ethos_utility_utility.cpp
deleted file mode 100644
index 6e3b23643054..000000000000
--- a/emulators/higan/files/patch-target-ethos_utility_utility.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- target-ethos/utility/utility.cpp.orig 2013-12-21 07:00:03 UTC
-+++ target-ethos/utility/utility.cpp
-@@ -203,7 +203,7 @@ void Utility::updateShader() {
- video.set(Video::Filter, Video::FilterLinear);
- } else if(config->video.shader == "Display Emulation") {
- if(program->active) {
-- string pathname = program->path("Video Shaders/");
-+ string pathname = program->path("shaders/");
- pathname.append("Display Emulation/");
- pathname.append(presentation->systemName, ".shader/");
- if(directory::exists(pathname)) {