diff options
author | Vaxry <[email protected]> | 2023-12-01 00:22:49 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-12-01 00:23:48 +0000 |
commit | ab40f240c3211412641fdf05b52bf0f1b033fa7d (patch) | |
tree | 51da8a904d38deda9ad2ae6d4fd918415bb9dc5f | |
parent | b394c1695c05cf3b2133a473aa459d4cd750911b (diff) | |
download | Hyprland-ab40f240c3211412641fdf05b52bf0f1b033fa7d.tar.gz Hyprland-ab40f240c3211412641fdf05b52bf0f1b033fa7d.zip |
screencopy: use drmFormat instead of wlr funcs
ref #4014
-rw-r--r-- | src/protocols/Screencopy.cpp | 2 | ||||
-rw-r--r-- | src/protocols/ToplevelExport.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index 50528ca3..7240fd37 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -210,7 +210,7 @@ void CScreencopyProtocolManager::captureOutput(wl_client* client, wl_resource* r PFRAME->client = PCLIENT; PCLIENT->ref++; - PFRAME->shmFormat = g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XRGB8888 : wlr_output_preferred_read_format(PFRAME->pMonitor->output); + PFRAME->shmFormat = g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XRGB8888 : PFRAME->pMonitor->drmFormat; if (PFRAME->shmFormat == DRM_FORMAT_INVALID) { Debug::log(ERR, "No format supported by renderer in capture output"); zwlr_screencopy_frame_v1_send_failed(PFRAME->resource); diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp index ef9906d9..aa035b6e 100644 --- a/src/protocols/ToplevelExport.cpp +++ b/src/protocols/ToplevelExport.cpp @@ -177,7 +177,7 @@ void CToplevelExportProtocolManager::captureToplevel(wl_client* client, wl_resou const auto PMONITOR = g_pCompositor->getMonitorFromID(PFRAME->pWindow->m_iMonitorID); - PFRAME->shmFormat = g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XRGB8888 : wlr_output_preferred_read_format(PMONITOR->output); + PFRAME->shmFormat = g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XRGB8888 : PMONITOR->drmFormat; if (PFRAME->shmFormat == DRM_FORMAT_INVALID) { Debug::log(ERR, "No format supported by renderer in capture toplevel"); hyprland_toplevel_export_frame_v1_send_failed(resource); |