From 67069d4a1223996b6e95be1d9270c2d9a674a776 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 8 Mar 2026 11:06:27 +0800 Subject: [PATCH] [Fix]: compilation error after merge --- MobileGL/MG_Backend/DirectVulkan/Renderer/SwapchainObject.cpp | 2 +- MobileGL/MG_State/EGLState/Core.cpp | 4 ++++ MobileGL/MG_State/EGLState/Core.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MobileGL/MG_Backend/DirectVulkan/Renderer/SwapchainObject.cpp b/MobileGL/MG_Backend/DirectVulkan/Renderer/SwapchainObject.cpp index d81a8512..433e02b0 100644 --- a/MobileGL/MG_Backend/DirectVulkan/Renderer/SwapchainObject.cpp +++ b/MobileGL/MG_Backend/DirectVulkan/Renderer/SwapchainObject.cpp @@ -233,7 +233,7 @@ namespace MobileGL::MG_Backend::DirectVulkan { imageCount); // Properly initialize Default FBO here - auto* defaultFBOInfo = MG_Impl::GLImpl::FramebufferImpl::pDefaultFramebufferInfo; + auto& defaultFBOInfo = MG_Impl::GLImpl::FramebufferImpl::pDefaultFramebufferInfo; auto* colorTex = static_cast(defaultFBOInfo->colorAttachment.get()); colorTex->AllocateStorage( TextureUploadTarget::Texture2D, 0, { diff --git a/MobileGL/MG_State/EGLState/Core.cpp b/MobileGL/MG_State/EGLState/Core.cpp index 03bec17e..48a7a6a3 100644 --- a/MobileGL/MG_State/EGLState/Core.cpp +++ b/MobileGL/MG_State/EGLState/Core.cpp @@ -16,6 +16,10 @@ namespace MobileGL { constexpr EGLint EGL_DISPLAY_MINOR_VERSION = 5; } // namespace + Bool EGLContext::DisplayLookupKey::operator==(const DisplayLookupKey& rhs) const { + return this->NativeDisplayKey == rhs.NativeDisplayKey && this->Platform == rhs.Platform; + } + SizeT EGLContext::DisplayLookupHasher::operator()(const DisplayLookupKey& key) const { const auto nativeHash = std::hash{}(key.NativeDisplayKey); const auto platformHash = std::hash{}(static_cast(key.Platform)); diff --git a/MobileGL/MG_State/EGLState/Core.h b/MobileGL/MG_State/EGLState/Core.h index 1df2cd8c..65a12206 100644 --- a/MobileGL/MG_State/EGLState/Core.h +++ b/MobileGL/MG_State/EGLState/Core.h @@ -115,7 +115,7 @@ namespace MobileGL { Uint64 NativeDisplayKey = 0; EGLenum Platform = EGL_NONE; - Bool operator==(const DisplayLookupKey& rhs) const = default; + Bool operator==(const DisplayLookupKey& rhs) const; }; struct DisplayLookupHasher {