Previous 15994 Revisions Next

r7855 Sunday 18th April, 2010 at 13:01:05 UTC by Firewave
[WINUI] Removed some obsolete sound properties
[src/osd/winui]properties.c resource.h

src/osd/winui/resource.h
r7854r7855
154154#define IDC_SAMPLES_INCORRECT           1049
155155#define IDC_SAMPLES_TOTAL               1050
156156#define IDC_AUDIT_DETAILS               1051
157#define IDC_USE_FM_YM3812               1052
158157#define IDC_DIR_COMBO                   1053
159158#define IDC_DIR_LIST                    1054
160159#define IDC_DIR_BROWSE                  1055
r7854r7855
202201#define IDC_AUTOFRAMESKIP               1097
203202#define IDC_TREE                        1098
204203#define IDC_WINDOWED                    1099
205#define IDC_STEREO                      1100
206204#define IDC_PROP_RESET                  1101
207205#define IDC_SPLITTER                    1102
208206#define IDC_SPLITTER2                   1103
src/osd/winui/properties.c
r7854r7855
18921892      EnableWindow(GetDlgItem(hWnd,IDC_AUDIO_LATENCY_DISP),sound);
18931893      EnableWindow(GetDlgItem(hWnd,IDC_AUDIO_LATENCY_TEXT),sound);
18941894      SetSamplesEnabled(hWnd, nIndex, sound);
1895      SetStereoEnabled(hWnd, nIndex);
1896      SetYM3812Enabled(hWnd, nIndex);
18971895   }
18981896   
18991897   if (Button_GetCheck(GetDlgItem(hWnd, IDC_AUTOFRAMESKIP)))
r7854r7855
26032601}
26042602#endif
26052603
2606static 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
2629static 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
26632604static void SetSamplesEnabled(HWND hWnd, int nIndex, BOOL bSoundEnabled)
26642605{
26652606   machine_config *config = NULL;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team