diff options
Diffstat (limited to 'src/managers/screenshare/CursorshareSession.cpp')
| -rw-r--r-- | src/managers/screenshare/CursorshareSession.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/managers/screenshare/CursorshareSession.cpp b/src/managers/screenshare/CursorshareSession.cpp index a1664487..f093cfd8 100644 --- a/src/managers/screenshare/CursorshareSession.cpp +++ b/src/managers/screenshare/CursorshareSession.cpp @@ -5,7 +5,9 @@ #include "../../render/Renderer.hpp" #include "../../render/pass/ClearPassElement.hpp" #include "../../render/pass/TexPassElement.hpp" +#include <hyprgraphics/egl/Egl.hpp> +using namespace Hyprgraphics::Egl; using namespace Screenshare; CCursorshareSession::CCursorshareSession(wl_client* client, WP<CWLPointerResource> pointer) : m_client(client), m_pointer(pointer) { @@ -164,7 +166,7 @@ bool CCursorshareSession::copy() { callback(RESULT_COPIED); }); } else if (auto attrs = m_pendingFrame.buffer->shm(); attrs.success) { - const auto PFORMAT = NFormatUtils::getPixelFormatFromDRM(m_format); + const auto PFORMAT = getPixelFormatFromDRM(m_format); if (attrs.format != m_format || !PFORMAT) { LOGM(Log::ERR, "Can't copy: invalid format"); @@ -190,11 +192,9 @@ bool CCursorshareSession::copy() { if (glFormat != GL_BGRA_EXT && glFormat != GL_RGB) { if (PFORMAT->swizzle.has_value()) { - std::array<GLint, 4> RGBA = SWIZZLE_RGBA; - std::array<GLint, 4> BGRA = SWIZZLE_BGRA; - if (PFORMAT->swizzle == RGBA) + if (PFORMAT->swizzle == SWIZZLE_RGBA) glFormat = GL_RGBA; - else if (PFORMAT->swizzle == BGRA) + else if (PFORMAT->swizzle == SWIZZLE_BGRA) glFormat = GL_BGRA_EXT; else { LOGM(Log::ERR, "Copied frame via shm might be broken or color flipped"); |
