diff options
Diffstat (limited to 'src/emu/ui')
| -rw-r--r-- | src/emu/ui/barcode.c | 14 | ||||
| -rw-r--r-- | src/emu/ui/devctrl.h | 6 | ||||
| -rw-r--r-- | src/emu/ui/devopt.c | 34 | ||||
| -rw-r--r-- | src/emu/ui/devopt.h | 4 | ||||
| -rw-r--r-- | src/emu/ui/filemngr.c | 18 | ||||
| -rw-r--r-- | src/emu/ui/imgcntrl.c | 2 | ||||
| -rw-r--r-- | src/emu/ui/imgcntrl.h | 4 | ||||
| -rw-r--r-- | src/emu/ui/info.c | 10 | ||||
| -rw-r--r-- | src/emu/ui/inputmap.c | 20 | ||||
| -rw-r--r-- | src/emu/ui/sliders.c | 8 | ||||
| -rw-r--r-- | src/emu/ui/slotopt.h | 4 | ||||
| -rw-r--r-- | src/emu/ui/tapectrl.c | 22 |
12 files changed, 73 insertions, 73 deletions
diff --git a/src/emu/ui/barcode.c b/src/emu/ui/barcode.c index c7cdd730ad0..3b9f429c8db 100644 --- a/src/emu/ui/barcode.c +++ b/src/emu/ui/barcode.c @@ -20,9 +20,9 @@ /************************************************** - + BARCODE READER MENU - + **************************************************/ @@ -51,7 +51,7 @@ ui_menu_barcode_reader::~ui_menu_barcode_reader() void ui_menu_barcode_reader::populate() { if (current_device()) - { + { astring buffer; const char *new_barcode; @@ -68,13 +68,13 @@ void ui_menu_barcode_reader::populate() { new_barcode = m_barcode_buffer; } - + item_append("New Barcode:", new_barcode, 0, ITEMREF_NEW_BARCODE); - + // finish up the menu item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); item_append("Enter Code", NULL, 0, ITEMREF_ENTER_BARCODE); - + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; } } @@ -103,7 +103,7 @@ void ui_menu_barcode_reader::handle() if (event->itemref == ITEMREF_SELECT_READER) previous(); break; - + case IPT_UI_RIGHT: if (event->itemref == ITEMREF_SELECT_READER) next(); diff --git a/src/emu/ui/devctrl.h b/src/emu/ui/devctrl.h index ec6dafc7b9e..81fe091315b 100644 --- a/src/emu/ui/devctrl.h +++ b/src/emu/ui/devctrl.h @@ -9,9 +9,9 @@ printers) The base class contains calls to get the total number of devices of the same kind connected to the driver, and shortcuts to switch current - device to next one or previous one attached. This allows, for instance, - users to pass from a device to another one by simply pressing left/right - and the menu is rebuilt accordingly, without the need of a preliminary + device to next one or previous one attached. This allows, for instance, + users to pass from a device to another one by simply pressing left/right + and the menu is rebuilt accordingly, without the need of a preliminary submenu listing available devices of the same kind. Copyright Nicola Salmoria and the MAME Team. diff --git a/src/emu/ui/devopt.c b/src/emu/ui/devopt.c index e05e4070512..3256ae030a3 100644 --- a/src/emu/ui/devopt.c +++ b/src/emu/ui/devopt.c @@ -66,7 +66,7 @@ void ui_menu_device_config::populate() // get cpu specific clock that takes internal multiplier/dividers into account int clock = exec->device().clock(); - + // count how many identical CPUs we have int count = 1; const char *name = exec->device().name(); @@ -77,14 +77,14 @@ void ui_menu_device_config::populate() if (exectags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE) count++; } - + // if more than one, prepend a #x in front of the CPU name if (count > 1) string.catprintf(" %d" UTF8_MULTIPLY, count); else string.cat(" "); string.cat(name); - + // display clock in kHz or MHz if (clock >= 1000000) string.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); @@ -92,7 +92,7 @@ void ui_menu_device_config::populate() string.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); } } - + // display screen information screen_device_iterator scriter(*dev); if (scriter.count() > 0) @@ -101,21 +101,21 @@ void ui_menu_device_config::populate() for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next()) { string.catprintf(" Screen '%s': ", screen->tag()); - + if (screen->screen_type() == SCREEN_TYPE_VECTOR) string.cat("Vector\n"); else { const rectangle &visarea = screen->visible_area(); - + string.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", - visarea.width(), visarea.height(), - (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", - ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds)); + visarea.width(), visarea.height(), + (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", + ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds)); } } } - + // loop over all sound chips sound_interface_iterator snditer(*dev); if (snditer.count() > 0) @@ -126,7 +126,7 @@ void ui_menu_device_config::populate() { if (soundtags.add(sound->device().tag(), 1, FALSE) == TMERR_DUPLICATE) continue; - + // count how many identical sound chips we have int count = 1; sound_interface_iterator sndinneriter(*dev); @@ -142,7 +142,7 @@ void ui_menu_device_config::populate() else string.cat(" "); string.cat(sound->device().name()); - + // display clock in kHz or MHz int clock = sound->device().clock(); if (clock >= 1000000) @@ -156,7 +156,7 @@ void ui_menu_device_config::populate() // scan for BIOS settings int bios = 0; - if (dev->rom_region()) + if (dev->rom_region()) { astring bios_str; // first loop through roms in search of default bios (shortname) @@ -174,11 +174,11 @@ void ui_menu_device_config::populate() bios_str.cpy(ROM_GETHASHDATA(rom)); } } - + if (bios) string.catprintf("* BIOS settings:\n %d options [default: %s]\n", bios, bios_str.cstr()); } - + int input = 0, input_mj = 0, input_hana = 0, input_gamble = 0, input_analog = 0, input_adjust = 0; int input_keypad = 0, input_keyboard = 0, dips = 0, confs = 0; astring errors, dips_opt, confs_opt; @@ -265,7 +265,7 @@ void ui_menu_device_config::populate() for (const device_image_interface *imagedev = imgiter.first(); imagedev != NULL; imagedev = imgiter.next()) string.catprintf(" %s [tag: %s]\n", imagedev->image_type_name(), imagedev->device().tag()); } - + slot_interface_iterator slotiter(*dev); if (slotiter.count() > 0) { @@ -275,7 +275,7 @@ void ui_menu_device_config::populate() } if ((execiter.count() + scriter.count() + snditer.count() + imgiter.count() + slotiter.count() + bios + dips + confs - + input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0) + + input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0) string.cat("[None]\n"); const_cast<machine_config &>(machine().config()).device_remove(&machine().config().root_device(), m_option->name()); diff --git a/src/emu/ui/devopt.h b/src/emu/ui/devopt.h index 2640d358460..2319acbaeb1 100644 --- a/src/emu/ui/devopt.h +++ b/src/emu/ui/devopt.h @@ -1,9 +1,9 @@ /*************************************************************************** ui/devopt.h - + Internal menu for the device configuration. - + Copyright Nicola Salmoria and the MAME Team. Visit http://mamedev.org for licensing and usage restrictions. diff --git a/src/emu/ui/filemngr.c b/src/emu/ui/filemngr.c index 63fe69d4274..2c4097f96b9 100644 --- a/src/emu/ui/filemngr.c +++ b/src/emu/ui/filemngr.c @@ -64,12 +64,12 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring { // get the image type/id instance.printf("%s (%s)", img->instance_name(), img->brief_instance_name()); - + // get the base name if (img->basename() != NULL) { filename.cpy(img->basename()); - + // if the image has been loaded through softlist, also show the loaded part if (img->part_entry() != NULL) { @@ -107,7 +107,7 @@ void ui_menu_file_manager::populate() item_append(m_warnings, NULL, MENU_FLAG_DISABLE, NULL); item_append("", NULL, MENU_FLAG_DISABLE, NULL); } - + // cycle through all devices for this system device_iterator iter(machine().root_device()); tagmap_t<UINT8> devtags; @@ -120,7 +120,7 @@ void ui_menu_file_manager::populate() // check whether it owns an image interface image_interface_iterator subiter(*dev); if (subiter.count() > 0) - { + { // if so, cycle through all its image interfaces image_interface_iterator subiter(*dev); for (device_image_interface *scan = subiter.first(); scan != NULL; scan = subiter.next()) @@ -172,7 +172,7 @@ void ui_menu_file_manager::handle() if (selected_device != NULL) { ui_menu::stack_push(selected_device->get_selection_menu(machine(), container)); - + // reset the existing menu reset(UI_MENU_RESET_REMEMBER_POSITION); } @@ -182,19 +182,19 @@ void ui_menu_file_manager::handle() // force file manager menu void ui_menu_file_manager::force_file_manager(running_machine &machine, render_container *container, const char *warnings) -{ +{ // reset the menu stack ui_menu::stack_reset(machine); - + // add the quit entry followed by the game select entry ui_menu *quit = auto_alloc_clear(machine, ui_menu_quit_game(machine, container)); quit->set_special_main_menu(true); ui_menu::stack_push(quit); ui_menu::stack_push(auto_alloc_clear(machine, ui_menu_file_manager(machine, container, warnings))); - + // force the menus on machine.ui().show_menu(); - + // make sure MAME is paused machine.pause(); } diff --git a/src/emu/ui/imgcntrl.c b/src/emu/ui/imgcntrl.c index 645687e595a..21d14b9a59a 100644 --- a/src/emu/ui/imgcntrl.c +++ b/src/emu/ui/imgcntrl.c @@ -328,7 +328,7 @@ void ui_menu_control_device_image::handle() state = create_ok ? CREATE_FILE : START_FILE; handle(); break; - + case DO_CREATE: { astring path; zippath_combine(path, current_directory, current_file); diff --git a/src/emu/ui/imgcntrl.h b/src/emu/ui/imgcntrl.h index 3b6f4d111f4..62912ce6922 100644 --- a/src/emu/ui/imgcntrl.h +++ b/src/emu/ui/imgcntrl.h @@ -27,8 +27,8 @@ public: protected: enum { - START_FILE, START_OTHER_PART, START_SOFTLIST, - SELECT_PARTLIST, SELECT_ONE_PART, SELECT_OTHER_PART, + START_FILE, START_OTHER_PART, START_SOFTLIST, + SELECT_PARTLIST, SELECT_ONE_PART, SELECT_OTHER_PART, SELECT_FILE, CREATE_FILE, CREATE_CONFIRM, CHECK_CREATE, DO_CREATE, SELECT_SOFTLIST, LAST_ID }; diff --git a/src/emu/ui/info.c b/src/emu/ui/info.c index ea91914e64a..ba4fa24977a 100644 --- a/src/emu/ui/info.c +++ b/src/emu/ui/info.c @@ -89,21 +89,21 @@ void ui_menu_image_info::image_info(device_image_interface *image) // display long filename item_append(image->longname(), "", MENU_FLAG_DISABLE, NULL); - + // display manufacturer and year string.catprintf("%s, %s", image->manufacturer(), image->year()); item_append(string, "", MENU_FLAG_DISABLE, NULL); // display supported information, if available - switch (image->supported()) + switch (image->supported()) { - case SOFTWARE_SUPPORTED_NO: + case SOFTWARE_SUPPORTED_NO: item_append("Not supported", "", MENU_FLAG_DISABLE, NULL); break; - case SOFTWARE_SUPPORTED_PARTIAL: + case SOFTWARE_SUPPORTED_PARTIAL: item_append("Partially supported", "", MENU_FLAG_DISABLE, NULL); break; - default: + default: break; } } diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c index 7f3b7942691..4150bfc9649 100644 --- a/src/emu/ui/inputmap.c +++ b/src/emu/ui/inputmap.c @@ -487,7 +487,7 @@ void ui_menu_settings::handle() if (menu_event != NULL && menu_event->itemref != NULL) { // reset - if ((FPTR)menu_event->itemref == 1) + if ((FPTR)menu_event->itemref == 1) { if (menu_event->iptkey == IPT_UI_SELECT) machine().schedule_hard_reset(); @@ -498,7 +498,7 @@ void ui_menu_settings::handle() ioport_field *field = (ioport_field *)menu_event->itemref; ioport_field::user_settings settings; int changed = false; - + switch (menu_event->iptkey) { /* if selected, reset to default value */ @@ -508,20 +508,20 @@ void ui_menu_settings::handle() field->set_user_settings(settings); changed = true; break; - + /* left goes to previous setting */ case IPT_UI_LEFT: field->select_previous_setting(); changed = true; break; - + /* right goes to next setting */ case IPT_UI_RIGHT: field->select_next_setting(); changed = true; break; } - + /* if anything changed, rebuild the menu, trying to stay on the same field */ if (changed) reset(UI_MENU_RESET_REMEMBER_REF); @@ -628,7 +628,7 @@ void ui_menu_settings::populate() } if (type == IPT_DIPSWITCH) custombottom = dipcount ? dipcount * (DIP_SWITCH_HEIGHT + DIP_SWITCH_SPACING) + DIP_SWITCH_SPACING : 0; - + item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); item_append("Reset", NULL, 0, (void *)1); } @@ -661,18 +661,18 @@ void ui_menu_settings_dip_switches::custom_render(void *selectedref, float top, { const ioport_diplocation *diploc; UINT32 selectedmask = 0; - + // determine the mask of selected bits if ((FPTR)selectedref != 1) { ioport_field *field = (ioport_field *)selectedref; - + if (field != NULL && field->first_diplocation() != NULL) for (diploc = field->first_diplocation(); diploc != NULL; diploc = diploc->next()) if (strcmp(dip->name, diploc->name()) == 0) selectedmask |= 1 << (diploc->number() - 1); } - + // draw one switch custom_render_one(x1, y1, x2, y1 + DIP_SWITCH_HEIGHT, dip, selectedmask); y1 += (float)(DIP_SWITCH_SPACING + DIP_SWITCH_HEIGHT); @@ -884,7 +884,7 @@ void ui_menu_analog::populate() } name.cpy(field->name()); - + /* allocate a data item for tracking what this menu item refers to */ data = (analog_item_data *)m_pool_alloc(sizeof(*data)); data->field = field; diff --git a/src/emu/ui/sliders.c b/src/emu/ui/sliders.c index db2d7c28fb5..5f3e6c9a717 100644 --- a/src/emu/ui/sliders.c +++ b/src/emu/ui/sliders.c @@ -242,18 +242,18 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom, UINT32 ui_menu_sliders::ui_handler(running_machine &machine, render_container *container, UINT32 state) { UINT32 result; - + /* if this is the first call, push the sliders menu */ if (state) ui_menu::stack_push(auto_alloc_clear(machine, ui_menu_sliders(machine, container, true))); - + /* handle standard menus */ result = ui_menu::ui_handler(machine, container, state); - + /* if we are cancelled, pop the sliders menu */ if (result == UI_HANDLER_CANCEL) ui_menu::stack_pop(machine); - + ui_menu_sliders *uim = dynamic_cast<ui_menu_sliders *>(menu_stack); return uim && uim->menuless_mode ? 0 : UI_HANDLER_CANCEL; } diff --git a/src/emu/ui/slotopt.h b/src/emu/ui/slotopt.h index 9f73e608fdd..a3c4514f06b 100644 --- a/src/emu/ui/slotopt.h +++ b/src/emu/ui/slotopt.h @@ -1,9 +1,9 @@ /*************************************************************************** ui/slotopt.h - + Internal menu for the slot options. - + Copyright Nicola Salmoria and the MAME Team. Visit http://mamedev.org for licensing and usage restrictions. diff --git a/src/emu/ui/tapectrl.c b/src/emu/ui/tapectrl.c index df4ca3bf11f..2b27278da26 100644 --- a/src/emu/ui/tapectrl.c +++ b/src/emu/ui/tapectrl.c @@ -56,7 +56,7 @@ ui_menu_tape_control::~ui_menu_tape_control() void ui_menu_tape_control::populate() { if (current_device()) - { + { // name of tape item_append(current_display_name(), current_device()->exists() ? current_device()->filename() : "No Tape Image loaded", current_display_flags(), TAPECMD_SELECT); @@ -67,7 +67,7 @@ void ui_menu_tape_control::populate() double t0 = current_device()->get_position(); double t1 = current_device()->get_length(); UINT32 tapeflags = 0; - + // state if (t1 > 0) { @@ -76,32 +76,32 @@ void ui_menu_tape_control::populate() if (t0 < t1) tapeflags |= MENU_FLAG_RIGHT_ARROW; } - + get_time_string(timepos, current_device(), NULL, NULL); state = current_device()->get_state(); item_append( (state & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED ? "stopped" : ((state & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY - ? ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "playing" : "(playing)") - : ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "recording" : "(recording)") - ), + ? ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "playing" : "(playing)") + : ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "recording" : "(recording)") + ), timepos, tapeflags, TAPECMD_SLIDER); - + // pause or stop item_append("Pause/Stop", NULL, 0, TAPECMD_STOP); - + // play item_append("Play", NULL, 0, TAPECMD_PLAY); - + // record item_append("Record", NULL, 0, TAPECMD_RECORD); - + // rewind item_append("Rewind", NULL, 0, TAPECMD_REWIND); - + // fast forward item_append("Fast Forward", NULL, 0, TAPECMD_FAST_FORWARD); } |
