* Callback function of the Timing configuration dialog. **/
| 72 | * Callback function of the Timing configuration dialog. |
| 73 | **/ |
| 74 | INT_PTR CALLBACK TimingConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| 75 | { |
| 76 | switch(uMsg) |
| 77 | { |
| 78 | case WM_INITDIALOG: |
| 79 | |
| 80 | // Update controls to the current settings. |
| 81 | if(eoptions & EO_HIGHPRIO) |
| 82 | { |
| 83 | CheckDlgButton(hwndDlg, CB_SET_HIGH_PRIORITY, BST_CHECKED); |
| 84 | } |
| 85 | |
| 86 | if(eoptions & EO_NOTHROTTLE) |
| 87 | { |
| 88 | CheckDlgButton(hwndDlg, CB_DISABLE_SPEED_THROTTLING, BST_CHECKED); |
| 89 | } |
| 90 | |
| 91 | if(newppu) |
| 92 | { |
| 93 | EnableWindow(GetDlgItem(hwndDlg, CB_OVERCLOCKING), false); |
| 94 | } |
| 95 | |
| 96 | if(overclock_enabled) |
| 97 | { |
| 98 | CheckDlgButton(hwndDlg, CB_OVERCLOCKING, BST_CHECKED); |
| 99 | EnableWindow(GetDlgItem(hwndDlg, IDC_EXTRA_SCANLINES), true); |
| 100 | EnableWindow(GetDlgItem(hwndDlg, CB_SKIP_7BIT), true); |
| 101 | EnableWindow(GetDlgItem(hwndDlg, IDC_VBLANK_SCANLINES), true); |
| 102 | EnableWindow(GetDlgItem(hwndDlg, IDC_VBLANK_SCANLINES_TEXT), true); |
| 103 | EnableWindow(GetDlgItem(hwndDlg, IDC_EXTRA_SCANLINES_TEXT), true); |
| 104 | } |
| 105 | if(skip_7bit_overclocking) |
| 106 | CheckDlgButton(hwndDlg, CB_SKIP_7BIT, BST_CHECKED); |
| 107 | |
| 108 | SendDlgItemMessage(hwndDlg,IDC_EXTRA_SCANLINES, EM_SETLIMITTEXT,3,0); |
| 109 | SendDlgItemMessage(hwndDlg,IDC_VBLANK_SCANLINES,EM_SETLIMITTEXT,3,0); |
| 110 | |
| 111 | sprintf(str,"%d",postrenderscanlines); |
| 112 | SetDlgItemText(hwndDlg,IDC_EXTRA_SCANLINES,str); |
| 113 | |
| 114 | sprintf(str,"%d",vblankscanlines); |
| 115 | SetDlgItemText(hwndDlg,IDC_VBLANK_SCANLINES,str); |
| 116 | |
| 117 | CenterWindowOnScreen(hwndDlg); |
| 118 | |
| 119 | break; |
| 120 | |
| 121 | case WM_CLOSE: |
| 122 | case WM_QUIT: |
| 123 | CloseTimingDialog(hwndDlg); |
| 124 | break; |
| 125 | |
| 126 | case WM_COMMAND: |
| 127 | |
| 128 | if(!(wParam >> 16)) |
| 129 | { |
| 130 | switch(wParam & 0xFFFF) |
| 131 | { |
nothing calls this directly
no test coverage detected