mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 03:05:59 +01:00
screencopy: use new isNvidia() for format
This commit is contained in:
parent
15b282ee0c
commit
b281d8647a
3 changed files with 5 additions and 5 deletions
|
@ -210,7 +210,7 @@ void CScreencopyProtocolManager::captureOutput(wl_client* client, wl_resource* r
|
||||||
PFRAME->client = PCLIENT;
|
PFRAME->client = PCLIENT;
|
||||||
PCLIENT->ref++;
|
PCLIENT->ref++;
|
||||||
|
|
||||||
PFRAME->shmFormat = wlr_output_preferred_read_format(PFRAME->pMonitor->output);
|
PFRAME->shmFormat = g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XRGB8888 : wlr_output_preferred_read_format(PFRAME->pMonitor->output);
|
||||||
if (PFRAME->shmFormat == DRM_FORMAT_INVALID) {
|
if (PFRAME->shmFormat == DRM_FORMAT_INVALID) {
|
||||||
Debug::log(ERR, "No format supported by renderer in capture output");
|
Debug::log(ERR, "No format supported by renderer in capture output");
|
||||||
zwlr_screencopy_frame_v1_send_failed(PFRAME->resource);
|
zwlr_screencopy_frame_v1_send_failed(PFRAME->resource);
|
||||||
|
|
|
@ -177,7 +177,7 @@ void CToplevelExportProtocolManager::captureToplevel(wl_client* client, wl_resou
|
||||||
|
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(PFRAME->pWindow->m_iMonitorID);
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(PFRAME->pWindow->m_iMonitorID);
|
||||||
|
|
||||||
PFRAME->shmFormat = wlr_output_preferred_read_format(PMONITOR->output);
|
PFRAME->shmFormat = g_pHyprRenderer->isNvidia() ? DRM_FORMAT_XRGB8888 : wlr_output_preferred_read_format(PMONITOR->output);
|
||||||
if (PFRAME->shmFormat == DRM_FORMAT_INVALID) {
|
if (PFRAME->shmFormat == DRM_FORMAT_INVALID) {
|
||||||
Debug::log(ERR, "No format supported by renderer in capture toplevel");
|
Debug::log(ERR, "No format supported by renderer in capture toplevel");
|
||||||
hyprland_toplevel_export_frame_v1_send_failed(resource);
|
hyprland_toplevel_export_frame_v1_send_failed(resource);
|
||||||
|
|
Loading…
Reference in a new issue