aboutsummaryrefslogtreecommitdiff
path: root/.patch/glslang/0001-haikuos-fix.patch
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2025-10-22 04:53:40 +0200
committercrueter <crueter@eden-emu.dev>2025-10-22 04:53:40 +0200
commit87cacbeed49facf18355c55cc93d0a2a0142be09 (patch)
tree320ab5933dd97b5f54f5fcc2cb4ed775587c9cbf /.patch/glslang/0001-haikuos-fix.patch
parent992bae4e2a14ca2547c09637b7dc6fc5f73b353a (diff)
[compat] HaikuOS port (#2805)
Still had the issues with libusb, but that should get solved with the other PRs anyways Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2805 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to '.patch/glslang/0001-haikuos-fix.patch')
-rw-r--r--.patch/glslang/0001-haikuos-fix.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/.patch/glslang/0001-haikuos-fix.patch b/.patch/glslang/0001-haikuos-fix.patch
new file mode 100644
index 0000000000..ba68bc9729
--- /dev/null
+++ b/.patch/glslang/0001-haikuos-fix.patch
@@ -0,0 +1,49 @@
+diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
+index be7f442..5fd0438 100644
+--- a/StandAlone/StandAlone.cpp
++++ b/StandAlone/StandAlone.cpp
+@@ -1766,9 +1766,10 @@ int singleMain()
+ glslang::FinalizeProcess();
+ } else {
+ ShInitialize();
++#ifndef __HAIKU__
+ ShInitialize(); // also test reference counting of users
+ ShFinalize(); // also test reference counting of users
+-
++#endif
+ bool printShaderNames = workList.size() > 1;
+
+ if (Options & EOptionMultiThreaded) {
+@@ -1793,8 +1794,9 @@ int singleMain()
+ PutsIfNonEmpty(WorkItems[w]->results.c_str());
+ }
+ }
+-
++#ifndef __HAIKU__
+ ShFinalize();
++#endif
+ }
+
+ if (CompileFailed.load())
+@@ -1809,8 +1811,10 @@ int C_DECL main(int argc, char* argv[])
+ {
+ ProcessArguments(WorkItems, argc, argv);
+
++#ifdef __HAIKU__
++ return singleMain();
++#else
+ int ret = 0;
+-
+ // Loop over the entire init/finalize cycle to watch memory changes
+ const int iterations = 1;
+ if (iterations > 1)
+@@ -1820,8 +1824,8 @@ int C_DECL main(int argc, char* argv[])
+ if (iterations > 1)
+ glslang::OS_DumpMemoryCounters();
+ }
+-
+ return ret;
++#endif
+ }
+
+ //