Previous 15994 Revisions Next

r6024 Friday 9th October, 2009 at 12:38:11 UTC by Dirk Best
[MESSRAM] Only the device named 'messram' can parse command line options
[src/mess/devices]messram.c

src/mess/devices/messram.c
r6023r6024
9797{
9898   messram_state *messram = get_safe_token(device);
9999   ram_config *config = device->inline_config;
100   const char *ramsize_string = options_get_string(mame_options(), OPTION_RAMSIZE);
101100
102   /* if we have a command line option, use it */
103   if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
104      messram->size = parse_string(ramsize_string);
105   else
101   /* the device named 'messram' can get ram options from command line */
102   if (strcmp(device->tag, "messram") == 0)
103   {
104      const char *ramsize_string = options_get_string(mame_options(), OPTION_RAMSIZE);
105
106      if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
107         messram->size = parse_string(ramsize_string);
108   }
109
110   /* if we didn't get a size yet, use the default */
111   if (messram->size == 0)
106112      messram->size = parse_string(config->default_size);
107113
108114   /* allocate space for the ram */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team