Change Apply button from bool to Lresult

This commit is contained in:
zilmar 2021-01-17 14:19:14 +10:30
parent fd1a6112c0
commit 0c177171ea
3 changed files with 17 additions and 17 deletions

View File

@ -71,12 +71,12 @@ public:
return TRUE;
}
bool OnApply()
LRESULT OnApply()
{
g_settings->SetAudioEnabled(m_btnMute.GetCheck() != BST_CHECKED);
g_settings->SetVolume(100 - m_Volume.GetPos());
FlushSettings();
return true;
return PSNRET_NOERROR;
}
private:
@ -117,11 +117,11 @@ public:
return TRUE;
}
bool OnApply()
LRESULT OnApply()
{
g_settings->SetBuffer(m_Buffer.GetPos());
FlushSettings();
return true;
return PSNRET_NOERROR;
}
private:
@ -188,7 +188,7 @@ public:
return TRUE;
}
bool OnApply()
LRESULT OnApply()
{
struct {
CComboBox & cmb;
@ -206,7 +206,7 @@ public:
SetSetting(TraceCMB[i].SettingId, TraceCMB[i].cmb.GetItemData(TraceCMB[i].cmb.GetCurSel()));
}
FlushSettings();
return true;
return PSNRET_NOERROR;
}
private:

View File

@ -42,7 +42,7 @@ public:
BOOL OnInitDialog(CWindow /*wndFocus*/, LPARAM /*lInitParam*/);
HBRUSH OnCtlColorStatic(CDCHandle dc, CWindow wndStatic);
void RemoveMapping(const BUTTON & Button);
bool OnApply();
LRESULT OnApply();
private:
LRESULT OnScroll(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
@ -163,7 +163,7 @@ HBRUSH CControllerSettings::OnCtlColorStatic(CDCHandle dc, CWindow wndStatic)
return ::GetSysColorBrush(COLOR_WINDOW);
}
bool CControllerSettings::OnApply()
LRESULT CControllerSettings::OnApply()
{
N64CONTROLLER & Controller = g_InputPlugin->Controllers(m_ControllerNumber);
Controller = m_Controller;
@ -171,7 +171,7 @@ bool CControllerSettings::OnApply()
Controller.DeadZone = (uint8_t)m_DeadZone.GetPos();
CONTROL & ControlInfo = g_InputPlugin->ControlInfo(m_ControllerNumber);
ControlInfo.Present = (m_PluggedIn.GetCheck() == BST_CHECKED) ? 1 : 0;
return g_InputPlugin->SaveController(m_ControllerNumber);
return g_InputPlugin->SaveController(m_ControllerNumber) ? PSNRET_NOERROR : PSNRET_INVALID_NOCHANGEPAGE;
}
LRESULT CControllerSettings::OnScroll(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/)

View File

@ -305,7 +305,7 @@ public:
return TRUE;
}
bool OnApply()
LRESULT OnApply()
{
wchar_t spinVRAM[100];
m_spinVRAM.GetWindowText(spinVRAM, sizeof(spinVRAM));
@ -322,7 +322,7 @@ public:
g_settings->WriteSettings();
}
m_options_page->UpdateTextureSettings();
return true;
return PSNRET_NOERROR;
}
private:
void ItemChanged(UINT /*Code*/, int id, HWND /*ctl*/)
@ -473,7 +473,7 @@ public:
return TRUE;
}
bool OnApply()
LRESULT OnApply()
{
g_settings->SetFiltering((CSettings::Filtering_t)m_cmbFiltering.GetItemData(m_cmbFiltering.GetCurSel()));
g_settings->SetAspectmode((CSettings::AspectMode_t)m_cmbAspect.GetItemData(m_cmbAspect.GetCurSel()));
@ -514,7 +514,7 @@ public:
{
g_settings->WriteSettings();
}
return true;
return PSNRET_NOERROR;
}
private:
void ItemChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
@ -608,7 +608,7 @@ public:
return TRUE;
}
bool OnApply()
LRESULT OnApply()
{
struct {
CComboBox & cmb;
@ -631,7 +631,7 @@ public:
{
SetSetting(TraceCMB[i].SettingId, TraceCMB[i].cmb.GetItemData(TraceCMB[i].cmb.GetCurSel()));
}
return true;
return PSNRET_NOERROR;
}
private:
void ItemChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)
@ -770,7 +770,7 @@ public:
return TRUE;
}
bool OnApply()
LRESULT OnApply()
{
wchar_t texcache[100];
m_textTexCache.GetWindowText(texcache, sizeof(texcache));
@ -795,7 +795,7 @@ public:
{
g_settings->WriteSettings();
}
return true;
return PSNRET_NOERROR;
}
private:
void ItemChanged(UINT /*Code*/, int /*id*/, HWND /*ctl*/)