Previous 15994 Revisions Next

r4301 Thursday 19th February, 2009 at 12:55:41 UTC by Nathan Woods
Sync with MAMEUI
[src/osd/winui]mui_util.c properties.c

src/osd/winui/mui_util.c
r4300r4301
411411            const device_config *sound;
412412            const char * const * samplenames = NULL;
413413
414            for (sound = device_list_class_first(config->devicelist, DEVICE_CLASS_SOUND_CHIP); sound != NULL;
415               sound = device_list_class_next(sound, DEVICE_CLASS_SOUND_CHIP))
414            for (sound = sound_first(config); sound != NULL; sound = sound_next(sound))
416415            {
417416
418417               {
419418#if (HAS_SAMPLES)
420                  if( config->sound[i].type == SOUND_SAMPLES )
421                     samplenames = ((samples_interface *)config->sound[i].config)->samplenames;
419                  if( sound_get_type(sound) == SOUND_SAMPLES )
420                     samplenames = ((const samples_interface *)sound->static_config)->samplenames;
422421#endif
423422               }
424423            }
src/osd/winui/properties.c
r4300r4301
657657      int clock,count;
658658      device_type sound_type_;
659659
660      sound_type_ = sound->type;
660      sound_type_ = sound_get_type(sound);
661661      clock = sound->clock;
662662
663663      count = 1;
r4300r4301
665665
666666      /* Matching chips at the same clock are aggregated */
667667      while (sound != NULL
668         && sound->type == sound_type_
668         && sound_get_type(sound) == sound_type_
669669         && sound->clock == clock)
670670      {
671671         count++;
r4300r4301
25682568#if HAS_YM3812
25692569            ||  sound->type == SOUND_YM3812
25702570#endif
2571#if HAS_YM3526
2572            ||  sound->type == SOUND_YM3526
2573#endif
25742571#if HAS_YM2413
25752572            ||  sound->type == SOUND_YM2413
25762573#endif
r4300r4301
25902587{
25912588   machine_config *config = NULL;
25922589#if (HAS_SAMPLES == 1) || (HAS_VLM5030 == 1)
2593   int i;
25942590   BOOL enabled = FALSE;
25952591   HWND hCtrl;
25962592
r4300r4301
26022598   
26032599   if (hCtrl)
26042600   {
2605      for (i = 0; i < MAX_SOUND; i++)
2601      const device_config *sound;
2602      for (sound = sound_first(config); sound != NULL; sound = sound_next(sound))
26062603      {
2607         if (nIndex <= -1
2608         ||  config->sound[i].type == SOUND_SAMPLES
2604         if (sound_get_type(sound) == SOUND_SAMPLES
26092605#if HAS_VLM5030
2610         ||  config->sound[i].type == SOUND_VLM5030
2606            ||  sound_get_type(sound) == SOUND_VLM5030
26112607#endif
2612         )
2608            )
2609         {
26132610            enabled = TRUE;
2611         }
26142612      }
2613
26152614      enabled = enabled && bSoundEnabled;
26162615      EnableWindow(hCtrl, enabled);
26172616   }

Previous 15994 Revisions Next


© 1998-2018 The MESS Team