mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-11-17 15:38:45 +00:00
Compare commits
1 Commits
idd-config
...
idd-config
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d73e676427 |
@@ -93,7 +93,7 @@ LRESULT CConfigWindow::onCreate()
|
||||
|
||||
m_modeGroup.reset(new CGroupBox(L"Custom modes", WS_CHILD | WS_VISIBLE, m_hwnd));
|
||||
|
||||
m_modeBox.reset(new CListBox(WS_CHILD | WS_VISIBLE | LBS_NOTIFY, m_hwnd));
|
||||
m_modeBox.reset(new CListBox(WS_CHILD | WS_VISIBLE | WS_VSCROLL | LBS_NOTIFY, m_hwnd));
|
||||
if (m_modes)
|
||||
{
|
||||
m_modeBox->addItem(L"<add new>", -1);
|
||||
@@ -178,17 +178,9 @@ LRESULT CConfigWindow::onCommand(WORD id, WORD code, HWND hwnd)
|
||||
|
||||
int index = m_modeBox->getData(sel);
|
||||
auto &mode = index >= 0 ? (*m_modes)[index] : m_modes->emplace_back();
|
||||
|
||||
try
|
||||
{
|
||||
mode.width = m_modeWidth->getNumericValue();
|
||||
mode.height = m_modeHeight->getNumericValue();
|
||||
mode.refresh = m_modeRefresh->getNumericValue();
|
||||
}
|
||||
catch (std::logic_error&)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
mode.width = m_modeWidth->getNumericValue();
|
||||
mode.height = m_modeHeight->getNumericValue();
|
||||
mode.refresh = m_modeRefresh->getNumericValue();
|
||||
|
||||
if (index >= 0)
|
||||
m_modeBox->delItem(sel);
|
||||
|
||||
Reference in New Issue
Block a user