| 464 | } |
| 465 | |
| 466 | void ToggleUnofficialPropertiesEnabled(HWND hwnd, bool ines20, bool check) |
| 467 | { |
| 468 | bool sub_enable = !ines20 && check; |
| 469 | |
| 470 | // Unofficial Properties only available in ines 1.0 |
| 471 | EnableWindow(GetDlgItem(hwnd, IDC_UNOFFICIAL_GROUP), sub_enable); |
| 472 | EnableWindow(GetDlgItem(hwnd, IDC_CHECK_UNOFFICIAL_PRGRAM), sub_enable); |
| 473 | EnableWindow(GetDlgItem(hwnd, IDC_CHECK_UNOFFICIAL_EXTRA_REGION), sub_enable); |
| 474 | EnableWindow(GetDlgItem(hwnd, IDC_CHECK_UNOFFICIAL_BUS_CONFLICT), sub_enable); |
| 475 | // when unofficial properties is enabled or in ines 2.0 standard, Playchoice-10 in System groupbox is available |
| 476 | EnableWindow(GetDlgItem(hwnd, IDC_RADIO_SYSTEM_PLAYCHOICE10), ines20 || sub_enable); |
| 477 | |
| 478 | ToggleUnofficialPrgRamPresent(hwnd, ines20, check, IsDlgButtonChecked(hwnd, IDC_CHECK_UNOFFICIAL_PRGRAM) == BST_CHECKED); |
| 479 | ToggleUnofficialExtraRegionCode(hwnd, ines20, check, IsDlgButtonChecked(hwnd, IDC_CHECK_UNOFFICIAL_EXTRA_REGION) == BST_CHECKED); |
| 480 | |
| 481 | // Playchoice-10 is not available in ines 1.0 and unofficial is not checked, switch back to normal |
| 482 | if (!ines20 && !check && IsDlgButtonChecked(hwnd, IDC_RADIO_SYSTEM_PLAYCHOICE10) == BST_CHECKED) |
| 483 | CheckRadioButton(hwnd, IDC_RADIO_SYSTEM_NORMAL, IDC_RADIO_SYSTEM_EXTEND, IDC_RADIO_SYSTEM_NORMAL); |
| 484 | } |
| 485 | |
| 486 | void ToggleUnofficialExtraRegionCode(HWND hwnd, bool ines20, bool unofficial_check, bool check) |
| 487 | { |
no test coverage detected