mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 07:01:30 +00:00
[idd] capture: add forced indirect copy
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
@@ -55,6 +55,7 @@ CConfigWindow::CConfigWindow() : m_scale(1)
|
||||
m_noGPU = m_settings.getNoGPU();
|
||||
m_exclusive = m_settings.getExclusiveMonitor();
|
||||
m_forceFullDirectCopy = m_settings.getForceFullDirectCopy();
|
||||
m_forceIndirectCopy = m_settings.getForceIndirectCopy();
|
||||
}
|
||||
|
||||
if (!CreateWindowEx(0, MAKEINTATOM(s_atom), L"Looking Glass IDD Configuration",
|
||||
@@ -96,6 +97,7 @@ void CConfigWindow::updateFont()
|
||||
*m_defRefreshLabel, *m_defRefresh, *m_defRefreshHz, *m_modeSave, *m_modeRevert,
|
||||
*m_prefGroup, *m_prefNoGPU, *m_prefExclusive,
|
||||
*m_prefForceFullDirectCopy,
|
||||
*m_prefForceIndirectCopy,
|
||||
}))
|
||||
SendMessage(child, WM_SETFONT, (WPARAM)m_font.Get(), 1);
|
||||
}
|
||||
@@ -191,6 +193,8 @@ LRESULT CConfigWindow::onCreate()
|
||||
m_prefExclusive.reset(new CCheckbox(L"Make LG the only monitor", 0, m_hwnd));
|
||||
m_prefForceFullDirectCopy.reset(new CCheckbox(
|
||||
L"Force full direct frame copies", 0, m_hwnd));
|
||||
m_prefForceIndirectCopy.reset(new CCheckbox(
|
||||
L"Force indirect copy", 0, m_hwnd));
|
||||
|
||||
if (m_noGPU)
|
||||
m_prefNoGPU->setChecked(*m_noGPU);
|
||||
@@ -201,6 +205,9 @@ LRESULT CConfigWindow::onCreate()
|
||||
if (m_forceFullDirectCopy)
|
||||
m_prefForceFullDirectCopy->setChecked(*m_forceFullDirectCopy);
|
||||
|
||||
if (m_forceIndirectCopy)
|
||||
m_prefForceIndirectCopy->setChecked(*m_forceIndirectCopy);
|
||||
|
||||
LONG width, height;
|
||||
getMinimumSize(width, height);
|
||||
SetWindowPos(m_hwnd, NULL, 0, 0, width, height, SWP_NOMOVE | SWP_NOZORDER);
|
||||
@@ -240,10 +247,11 @@ LRESULT CConfigWindow::onResize(DWORD width, DWORD height)
|
||||
pos.pinBottomLeft(*m_modeSave, 20, 20, 132, 24);
|
||||
pos.pinBottomLeft(*m_modeRevert, 154, 20, 50, 24);
|
||||
|
||||
pos.pinTopLeft(*m_prefGroup, 224, 40, 200, 92);
|
||||
pos.pinTopLeft(*m_prefGroup, 224, 40, 200, 112);
|
||||
pos.pinTopLeft(*m_prefNoGPU, 236, 64, 176, 20);
|
||||
pos.pinTopLeft(*m_prefExclusive, 236, 84, 176, 20);
|
||||
pos.pinTopLeft(*m_prefForceFullDirectCopy, 236, 104, 188, 20);
|
||||
pos.pinTopLeft(*m_prefForceIndirectCopy, 236, 124, 188, 20);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -368,6 +376,22 @@ LRESULT CConfigWindow::onCommand(WORD id, WORD code, HWND hwnd)
|
||||
m_prefForceFullDirectCopy->setChecked(value);
|
||||
sendSettingChange();
|
||||
}
|
||||
else if (m_prefForceIndirectCopy &&
|
||||
hwnd == *m_prefForceIndirectCopy && code == BN_CLICKED &&
|
||||
m_forceIndirectCopy)
|
||||
{
|
||||
const bool value = !*m_forceIndirectCopy;
|
||||
const LSTATUS result = m_settings.setForceIndirectCopy(value);
|
||||
if (result != ERROR_SUCCESS)
|
||||
{
|
||||
DEBUG_ERROR_HR(result, "Failed to save ForceIndirectCopy");
|
||||
return 0;
|
||||
}
|
||||
|
||||
*m_forceIndirectCopy = value;
|
||||
m_prefForceIndirectCopy->setChecked(value);
|
||||
sendSettingChange();
|
||||
}
|
||||
else if (m_modeSave && hwnd == *m_modeSave && code == BN_CLICKED)
|
||||
{
|
||||
bool updated = false;
|
||||
|
||||
Reference in New Issue
Block a user