MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / DlgOK

Method DlgOK

source/Configuration/PageConfig.cpp:272–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void CPageConfig::DlgOK(HWND hWnd)
273{
274 // This GetConfigNew() has already been set:
275 // . m_Apple2Type, m_CpuType, m_monochromeRGB
276
277 m_PropertySheetHelper.GetConfigNew().m_confirmReboot = IsDlgButtonChecked(hWnd, IDC_CHECK_CONFIRM_REBOOT) ? true : false;
278
279 const uint32_t newMasterVolume = VOLUME_MAX - (uint32_t)SendDlgItemMessage(hWnd, IDC_SLIDER_MASTER_VOLUME, TBM_GETPOS, 0, 0); // Invert: L=MIN, R=MAX
280 m_PropertySheetHelper.GetConfigNew().m_masterVolume = newMasterVolume;
281
282 // Video
283
284 const VideoType_e newVideoType = (VideoType_e)SendDlgItemMessage(hWnd, IDC_VIDEOTYPE, CB_GETCURSEL, 0, 0);
285 m_PropertySheetHelper.GetConfigNew().m_videoType = newVideoType;
286
287 UINT newVideoStyle = IsDlgButtonChecked(hWnd, IDC_CHECK_HALF_SCAN_LINES) ? VS_HALF_SCANLINES : VS_NONE;
288 newVideoStyle |= IsDlgButtonChecked(hWnd, IDC_CHECK_VERTICAL_BLEND) ? VS_COLOR_VERTICAL_BLEND : VS_NONE;
289 m_PropertySheetHelper.GetConfigNew().m_videoStyle = (VideoStyle_e)newVideoStyle;
290
291 m_PropertySheetHelper.GetConfigNew().m_videoRefreshRate = IsDlgButtonChecked(hWnd, IDC_CHECK_50HZ_VIDEO) ? VR_50HZ : VR_60HZ;
292
293 m_PropertySheetHelper.GetConfigNew().m_fullScreen_ShowSubunitStatus = IsDlgButtonChecked(hWnd, IDC_CHECK_FS_SHOW_SUBUNIT_STATUS) ? true : false;
294
295 // Emulation speed control
296
297 m_PropertySheetHelper.GetConfigNew().m_enhanceDiskAccessSpeed = IsDlgButtonChecked(hWnd, IDC_ENHANCE_DISK_ENABLE) ? true : false;
298 m_PropertySheetHelper.GetConfigNew().m_scrollLockToggle = IsDlgButtonChecked(hWnd, IDC_SCROLLLOCK_TOGGLE) ? 1 : 0;
299
300 m_PropertySheetHelper.GetConfigNew().m_machineSpeed = IsDlgButtonChecked(hWnd, IDC_AUTHENTIC_SPEED) ? SPEED_NORMAL
301 : (uint32_t)SendDlgItemMessage(hWnd, IDC_SLIDER_CPU_SPEED, TBM_GETPOS, 0, 0);
302
303 m_PropertySheetHelper.PostMsgAfterClose(hWnd, m_Page);
304}
305
306void CPageConfig::ApplyConfigAfterClose()
307{

Callers

nothing calls this directly

Calls 1

PostMsgAfterCloseMethod · 0.80

Tested by

no test coverage detected