From 7883d3c8c877541936246af569159fd35d152870 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Tue, 11 Jun 2024 16:16:27 -0600 Subject: [PATCH] wayland: Fix build errors --- src/common/CMakeLists.txt | 3 +++ src/common/wayland/context.h | 1 - src/common/wayland/context_glx.cpp | 2 +- src/common/wayland/window_info.h | 4 ++-- src/common/wayland/x11_window.h | 1 - 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index ff6031c6d..15a0d27c1 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -212,6 +212,9 @@ if(UNIX AND NOT APPLE AND NOT ANDROID) target_include_directories(citra_common PRIVATE "${X11_INCLUDE_DIR}") add_compile_definitions(QAPPLICATION_CLASS=QApplication) + if (ENABLE_OPENGL) + target_link_libraries(citra_common PRIVATE glad) + endif() endif() create_target_directory_groups(citra_common) diff --git a/src/common/wayland/context.h b/src/common/wayland/context.h index 7526ac9f4..34162f38d 100644 --- a/src/common/wayland/context.h +++ b/src/common/wayland/context.h @@ -7,7 +7,6 @@ #include "window_info.h" namespace GL { -using namespace citra; class Context { public: Context(const WindowInfo& wi); diff --git a/src/common/wayland/context_glx.cpp b/src/common/wayland/context_glx.cpp index 133f24c95..23ab2b58b 100644 --- a/src/common/wayland/context_glx.cpp +++ b/src/common/wayland/context_glx.cpp @@ -69,7 +69,7 @@ bool ContextGLX::Initialize(const Version* versions_to_try, size_t num_versions_ } void* ContextGLX::GetProcAddress(const char* name) { - return reinterpret_cast(glXGetProcAddress(reinterpret_cast(name))); + return reinterpret_cast(glXGetProcAddressARB(reinterpret_cast(name))); } bool ContextGLX::ChangeSurface(const WindowInfo& new_wi) { diff --git a/src/common/wayland/window_info.h b/src/common/wayland/window_info.h index 9a019b95e..7ed2d4b29 100644 --- a/src/common/wayland/window_info.h +++ b/src/common/wayland/window_info.h @@ -18,8 +18,8 @@ struct WindowInfo { Type type = Type::Surfaceless; void* display_connection = nullptr; void* window_handle = nullptr; - citra::u32 surface_width = 0; - citra::u32 surface_height = 0; + u32 surface_width = 0; + u32 surface_height = 0; float surface_refresh_rate = 0.0f; float surface_scale = 1.0f; SurfaceFormat surface_format = SurfaceFormat::RGB8; diff --git a/src/common/wayland/x11_window.h b/src/common/wayland/x11_window.h index fd58c9fa3..928f3007c 100644 --- a/src/common/wayland/x11_window.h +++ b/src/common/wayland/x11_window.h @@ -4,7 +4,6 @@ #include "duckstation_compat.h" namespace GL { -using namespace citra; class X11Window { public: X11Window();