trunk/src/emu/ui/ui.cpp
| r253155 | r253156 | |
| 1625 | 1625 | if (machine.ui_input().pressed(IPT_UI_SAVE_STATE)) |
| 1626 | 1626 | { |
| 1627 | 1627 | machine.pause(); |
| 1628 | machine.ui().m_load_save_hold = true; |
| 1628 | 1629 | return machine.ui().set_handler(handler_load_save, LOADSAVE_SAVE); |
| 1629 | 1630 | } |
| 1630 | 1631 | |
| r253155 | r253156 | |
| 1632 | 1633 | if (machine.ui_input().pressed(IPT_UI_LOAD_STATE)) |
| 1633 | 1634 | { |
| 1634 | 1635 | machine.pause(); |
| 1636 | machine.ui().m_load_save_hold = true; |
| 1635 | 1637 | return machine.ui().set_handler(handler_load_save, LOADSAVE_LOAD); |
| 1636 | 1638 | } |
| 1637 | 1639 | |
| r253155 | r253156 | |
| 1713 | 1715 | else |
| 1714 | 1716 | machine.ui().draw_message_window(container, "Select position to load from"); |
| 1715 | 1717 | |
| 1718 | // if load/save state sequence is still being pressed, do not read the filename yet |
| 1719 | if (machine.ui().m_load_save_hold) { |
| 1720 | bool seq_in_progress = false; |
| 1721 | const input_seq &load_save_seq = state == LOADSAVE_SAVE ? |
| 1722 | machine.ioport().type_seq(IPT_UI_SAVE_STATE) : |
| 1723 | machine.ioport().type_seq(IPT_UI_LOAD_STATE); |
| 1724 | |
| 1725 | for (int i = 0; i < load_save_seq.length(); i++) |
| 1726 | if (machine.input().code_pressed_once(load_save_seq[i])) |
| 1727 | seq_in_progress = true; |
| 1728 | |
| 1729 | if (seq_in_progress) |
| 1730 | return state; |
| 1731 | else |
| 1732 | machine.ui().m_load_save_hold = false; |
| 1733 | } |
| 1734 | |
| 1716 | 1735 | // check for cancel key |
| 1717 | 1736 | if (machine.ui_input().pressed(IPT_UI_CANCEL)) |
| 1718 | 1737 | { |