Closed davidgarland closed 1 year ago
Just in case, here's the version of the diff that just uses a comment (thinking about it more, this one is probably better?):
diff --git a/src/frontend/duckstation/gl/context.cpp b/src/frontend/duckstation/gl/context.cpp
index 9f21cd6..fa92f44 100644
--- a/src/frontend/duckstation/gl/context.cpp
+++ b/src/frontend/duckstation/gl/context.cpp
@@ -15,7 +15,6 @@ Log_SetChannel(GL::Context);
#elif defined(__APPLE__)
#include "context_agl.h"
#else
-#include "context_egl_wayland.h"
#include "context_egl_x11.h"
#include "context_glx.h"
#endif
@@ -80,8 +79,6 @@ std::unique_ptr<GL::Context> Context::Create(const WindowInfo& wi, const Version
context = ContextGLX::Create(wi, versions_to_try, num_versions_to_try);
}
- if (wi.type == WindowInfo::Type::Wayland)
- context = ContextEGLWayland::Create(wi, versions_to_try, num_versions_to_try);
#endif
if (!context)
diff --git a/src/frontend/duckstation/gl/context_egl_wayland.cpp b/src/frontend/duckstation/gl/context_egl_wayland.cpp
index 16532e8..9387186 100644
--- a/src/frontend/duckstation/gl/context_egl_wayland.cpp
+++ b/src/frontend/duckstation/gl/context_egl_wayland.cpp
@@ -1,3 +1,4 @@
+/*
#include "context_egl_wayland.h"
#include "../log.h"
#include <dlfcn.h>
@@ -84,3 +85,4 @@ bool ContextEGLWayland::LoadModule()
return true;
}
} // namespace GL
+*/
diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt
index c74ec47..ad8597a 100644
--- a/src/frontend/qt_sdl/CMakeLists.txt
+++ b/src/frontend/qt_sdl/CMakeLists.txt
@@ -113,7 +113,6 @@ else()
find_package(X11 REQUIRED)
find_package(EGL REQUIRED)
- find_package(Wayland REQUIRED Client)
target_sources(melonDS PRIVATE
../duckstation/gl/context_egl.cpp
And of course I forgot to say: I'd be happy to make a PR for either of these solutions, depending which you'd prefer.
That second patch looks rather nice, I'd gladly take a PR!
The full terminal output, since it's relatively short:
It seems this owes to this line, which appears to have been done about 4 months ago according to the git blame: https://github.com/melonDS-emu/melonDS/blob/726fde4e8de3ae50df0373476ba1d952c04b7b67/src/frontend/qt_sdl/CMakeLists.txt#L116
The easiest possible "fix" would just be adding
wayland make
todepends
, making the intended way to install melonDS for non-wayland users:Another option would be to patch their code to not use wayland, which seems like a reasonable solution since they use it so sparingly, though I'm not sure how stable it'll prove to be; to save you the work, this patch seems to compile fine without wayland on my end and builds a working binary:
(By the way, is it considered better style to comment out large chunks of code to make the patch file smaller, rather than deleting code? I don't know which would be better behaved under them adding or deleting code on their end.. unsure where to look for best practices with this kinda stuff.)