screencopy: add force 8 bit to fix 10b screensharing (#11623)
ref https://github.com/hyprwm/xdg-desktop-portal-hyprland/issues/270
This commit is contained in:
parent
bce43f74eb
commit
02bb350bb3
6 changed files with 22 additions and 3 deletions
|
|
@ -3113,7 +3113,17 @@ void CHyprOpenGLImpl::setCapStatus(int cap, bool status) {
|
|||
}
|
||||
|
||||
uint32_t CHyprOpenGLImpl::getPreferredReadFormat(PHLMONITOR pMonitor) {
|
||||
return pMonitor->m_output->state->state().drmFormat;
|
||||
static const auto PFORCE8BIT = CConfigValue<Hyprlang::INT>("misc:screencopy_force_8b");
|
||||
|
||||
if (!*PFORCE8BIT)
|
||||
return pMonitor->m_output->state->state().drmFormat;
|
||||
|
||||
auto fmt = pMonitor->m_output->state->state().drmFormat;
|
||||
|
||||
if (fmt == DRM_FORMAT_BGRA1010102 || fmt == DRM_FORMAT_ARGB2101010 || fmt == DRM_FORMAT_XRGB2101010 || fmt == DRM_FORMAT_BGRX1010102)
|
||||
return DRM_FORMAT_XRGB8888;
|
||||
|
||||
return fmt;
|
||||
}
|
||||
|
||||
bool CHyprOpenGLImpl::explicitSyncSupported() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue