diff options
author | 2008-02-26 06:31:28 +0000 | |
---|---|---|
committer | 2008-02-26 06:31:28 +0000 | |
commit | adcdfd3e5be783192f621b2426236b736e9cff24 (patch) | |
tree | 02aab6efaca844757c18db9d8fa20897c582f9ab /src/emu/info.c | |
parent | d94da473664a3f211b47ec7cba1ae677df50766a (diff) |
Converted MACHINE_DRIVER definitions from function
constructors to tokenized lists. For the most part
this is a non-invasive change, except for those drivers
using MDRV_WATCHDOG_TIME_INIT. In order to allow for
tokenization of attotimes, a set of new macros is
provided called UINT64_ATTOTIME_IN_x() which follows the
same pattern as ATTOTIME_IN_x() but packs the attotime
down into a single 64-bit value for easier tokenization.
Separated MDRV_DEVICE_CONFIG_DATA into 32-bit and 64-bit
versions. Added floating-point versions with configurable
resolutions.
Fixed several errors in the machine drivers which were
caught by the additional checks now done in the machine
config detokenization code.
Converted speakers into devices. Machine->config no
longer houses an array of speakers; instead they are
iterated through using the new macros (defined in sound.h)
speaker_output_first() and speaker_output_next(). Updated
all relevant code to do this.
Improved game info display with multiple screens. Fixed
bug which caused all screens to display equally.
Added typedefs for all the machine config callback
functions at the top of driver.h.
Diffstat (limited to 'src/emu/info.c')
-rw-r--r-- | src/emu/info.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/emu/info.c b/src/emu/info.c index 737f96d6194..2c9be82fe82 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -767,8 +767,8 @@ static void print_game_display(FILE *out, const game_driver *game, const machine static void print_game_sound(FILE *out, const game_driver *game, const machine_config *config) { + int speakers = speaker_output_count(config); int has_sound = FALSE; - int speakers = 0; int sndnum; /* see if we have any sound chips to report */ @@ -780,10 +780,8 @@ static void print_game_sound(FILE *out, const game_driver *game, const machine_c } /* if we have sound, count the number of speakers */ - if (has_sound) - for (speakers = 0; speakers < ARRAY_LENGTH(config->speaker); speakers++) - if (config->speaker[speakers].tag == NULL) - break; + if (!has_sound) + speakers = 0; fprintf(out, "\t\t<sound channels=\"%d\"/>\n", speakers); } @@ -871,7 +869,7 @@ static void print_game_info(FILE *out, const game_driver *game) /* start tracking resources and allocate the machine and input configs */ begin_resource_tracking(); - config = machine_config_alloc(game->drv); + config = machine_config_alloc(game->machine_config); input = input_port_allocate(game->ipt, NULL); /* print the header and the game name */ |