diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-09-07 16:43:01 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-09-07 16:43:01 +0200 |
| commit | 398e861b554268e43e8af64ba72c682630302ec3 (patch) | |
| tree | c19313d5f375fb4c90c7ae049793bebc02764e42 /src/protocols | |
| parent | 0be6b03ee972fcc4921984f3b68469a2ee121511 (diff) | |
internal: fix warnings
Diffstat (limited to 'src/protocols')
| -rw-r--r-- | src/protocols/ToplevelExport.cpp | 2 | ||||
| -rw-r--r-- | src/protocols/ToplevelExportWlrFuncs.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp index f5e3c310..577efef4 100644 --- a/src/protocols/ToplevelExport.cpp +++ b/src/protocols/ToplevelExport.cpp @@ -404,7 +404,7 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times } // copy pixels - const auto PFORMAT = get_gles2_format_from_drm(format); + const auto PFORMAT = gles2FromDRM(format); if (!PFORMAT) { Debug::log(ERR, "[toplevel_export] Cannot read pixels, unsupported format {:x}", (uintptr_t)PFORMAT); g_pHyprOpenGL->end(); diff --git a/src/protocols/ToplevelExportWlrFuncs.hpp b/src/protocols/ToplevelExportWlrFuncs.hpp index c7f53341..b580d3f0 100644 --- a/src/protocols/ToplevelExportWlrFuncs.hpp +++ b/src/protocols/ToplevelExportWlrFuncs.hpp @@ -298,7 +298,7 @@ static const struct wlr_gles2_pixel_format formats[] = { #endif }; -static const struct wlr_gles2_pixel_format* get_gles2_format_from_drm(uint32_t fmt) { +inline const struct wlr_gles2_pixel_format* gles2FromDRM(uint32_t fmt) { for (size_t i = 0; i < sizeof(formats) / sizeof(*formats); ++i) { if (formats[i].drm_format == fmt) { return &formats[i]; |
