src/osd/winui/mui_util.c
| r4300 | r4301 | |
| 411 | 411 | const device_config *sound; |
| 412 | 412 | const char * const * samplenames = NULL; |
| 413 | 413 | |
| 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)) |
| 416 | 415 | { |
| 417 | 416 | |
| 418 | 417 | { |
| 419 | 418 | #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; |
| 422 | 421 | #endif |
| 423 | 422 | } |
| 424 | 423 | } |
src/osd/winui/properties.c
| r4300 | r4301 | |
| 657 | 657 | int clock,count; |
| 658 | 658 | device_type sound_type_; |
| 659 | 659 | |
| 660 | | sound_type_ = sound->type; |
| 660 | sound_type_ = sound_get_type(sound); |
| 661 | 661 | clock = sound->clock; |
| 662 | 662 | |
| 663 | 663 | count = 1; |
| r4300 | r4301 | |
| 665 | 665 | |
| 666 | 666 | /* Matching chips at the same clock are aggregated */ |
| 667 | 667 | while (sound != NULL |
| 668 | | && sound->type == sound_type_ |
| 668 | && sound_get_type(sound) == sound_type_ |
| 669 | 669 | && sound->clock == clock) |
| 670 | 670 | { |
| 671 | 671 | count++; |
| r4300 | r4301 | |
| 2568 | 2568 | #if HAS_YM3812 |
| 2569 | 2569 | || sound->type == SOUND_YM3812 |
| 2570 | 2570 | #endif |
| 2571 | | #if HAS_YM3526 |
| 2572 | | || sound->type == SOUND_YM3526 |
| 2573 | | #endif |
| 2574 | 2571 | #if HAS_YM2413 |
| 2575 | 2572 | || sound->type == SOUND_YM2413 |
| 2576 | 2573 | #endif |
| r4300 | r4301 | |
| 2590 | 2587 | { |
| 2591 | 2588 | machine_config *config = NULL; |
| 2592 | 2589 | #if (HAS_SAMPLES == 1) || (HAS_VLM5030 == 1) |
| 2593 | | int i; |
| 2594 | 2590 | BOOL enabled = FALSE; |
| 2595 | 2591 | HWND hCtrl; |
| 2596 | 2592 | |
| r4300 | r4301 | |
| 2602 | 2598 | |
| 2603 | 2599 | if (hCtrl) |
| 2604 | 2600 | { |
| 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)) |
| 2606 | 2603 | { |
| 2607 | | if (nIndex <= -1 |
| 2608 | | || config->sound[i].type == SOUND_SAMPLES |
| 2604 | if (sound_get_type(sound) == SOUND_SAMPLES |
| 2609 | 2605 | #if HAS_VLM5030 |
| 2610 | | || config->sound[i].type == SOUND_VLM5030 |
| 2606 | || sound_get_type(sound) == SOUND_VLM5030 |
| 2611 | 2607 | #endif |
| 2612 | | ) |
| 2608 | ) |
| 2609 | { |
| 2613 | 2610 | enabled = TRUE; |
| 2611 | } |
| 2614 | 2612 | } |
| 2613 | |
| 2615 | 2614 | enabled = enabled && bSoundEnabled; |
| 2616 | 2615 | EnableWindow(hCtrl, enabled); |
| 2617 | 2616 | } |