src/osd/winui/resource.h
| r7854 | r7855 | |
| 154 | 154 | #define IDC_SAMPLES_INCORRECT 1049 |
| 155 | 155 | #define IDC_SAMPLES_TOTAL 1050 |
| 156 | 156 | #define IDC_AUDIT_DETAILS 1051 |
| 157 | | #define IDC_USE_FM_YM3812 1052 |
| 158 | 157 | #define IDC_DIR_COMBO 1053 |
| 159 | 158 | #define IDC_DIR_LIST 1054 |
| 160 | 159 | #define IDC_DIR_BROWSE 1055 |
| r7854 | r7855 | |
| 202 | 201 | #define IDC_AUTOFRAMESKIP 1097 |
| 203 | 202 | #define IDC_TREE 1098 |
| 204 | 203 | #define IDC_WINDOWED 1099 |
| 205 | | #define IDC_STEREO 1100 |
| 206 | 204 | #define IDC_PROP_RESET 1101 |
| 207 | 205 | #define IDC_SPLITTER 1102 |
| 208 | 206 | #define IDC_SPLITTER2 1103 |
src/osd/winui/properties.c
| r7854 | r7855 | |
| 1892 | 1892 | EnableWindow(GetDlgItem(hWnd,IDC_AUDIO_LATENCY_DISP),sound); |
| 1893 | 1893 | EnableWindow(GetDlgItem(hWnd,IDC_AUDIO_LATENCY_TEXT),sound); |
| 1894 | 1894 | SetSamplesEnabled(hWnd, nIndex, sound); |
| 1895 | | SetStereoEnabled(hWnd, nIndex); |
| 1896 | | SetYM3812Enabled(hWnd, nIndex); |
| 1897 | 1895 | } |
| 1898 | 1896 | |
| 1899 | 1897 | if (Button_GetCheck(GetDlgItem(hWnd, IDC_AUTOFRAMESKIP))) |
| r7854 | r7855 | |
| 2603 | 2601 | } |
| 2604 | 2602 | #endif |
| 2605 | 2603 | |
| 2606 | | static void SetStereoEnabled(HWND hWnd, int nIndex) |
| 2607 | | { |
| 2608 | | BOOL enabled = FALSE; |
| 2609 | | HWND hCtrl; |
| 2610 | | int num_speakers = 0; |
| 2611 | | |
| 2612 | | if ( nIndex > -1) |
| 2613 | | { |
| 2614 | | machine_config *config = machine_config_alloc(drivers[nIndex]->machine_config); |
| 2615 | | num_speakers = numberOfSpeakers(config); |
| 2616 | | machine_config_free(config); |
| 2617 | | } |
| 2618 | | |
| 2619 | | hCtrl = GetDlgItem(hWnd, IDC_STEREO); |
| 2620 | | if (hCtrl) |
| 2621 | | { |
| 2622 | | if (nIndex <= -1 || num_speakers == 2) |
| 2623 | | enabled = TRUE; |
| 2624 | | |
| 2625 | | EnableWindow(hCtrl, enabled); |
| 2626 | | } |
| 2627 | | } |
| 2628 | | |
| 2629 | | static void SetYM3812Enabled(HWND hWnd, int nIndex) |
| 2630 | | { |
| 2631 | | BOOL enabled; |
| 2632 | | HWND hCtrl; |
| 2633 | | machine_config *config = NULL; |
| 2634 | | const device_config *sound; |
| 2635 | | |
| 2636 | | if (nIndex > -1) |
| 2637 | | { |
| 2638 | | config = machine_config_alloc(drivers[nIndex]->machine_config); |
| 2639 | | } |
| 2640 | | |
| 2641 | | hCtrl = GetDlgItem(hWnd, IDC_USE_FM_YM3812); |
| 2642 | | if (hCtrl) |
| 2643 | | { |
| 2644 | | enabled = FALSE; |
| 2645 | | |
| 2646 | | for (sound = config->devicelist.first(DEVICE_CLASS_SOUND_CHIP); sound != NULL; sound = sound->next) |
| 2647 | | { |
| 2648 | | if (nIndex <= -1 |
| 2649 | | || sound->type == SOUND_YM3812 |
| 2650 | | || sound->type == SOUND_YM2413 |
| 2651 | | ) |
| 2652 | | enabled = TRUE; |
| 2653 | | } |
| 2654 | | |
| 2655 | | EnableWindow(hCtrl, enabled); |
| 2656 | | } |
| 2657 | | if (nIndex > -1) |
| 2658 | | { |
| 2659 | | machine_config_free(config); |
| 2660 | | } |
| 2661 | | } |
| 2662 | | |
| 2663 | 2604 | static void SetSamplesEnabled(HWND hWnd, int nIndex, BOOL bSoundEnabled) |
| 2664 | 2605 | { |
| 2665 | 2606 | machine_config *config = NULL; |