summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/ui/ui.cpp3
-rw-r--r--src/emu/uiinput.cpp10
-rw-r--r--src/emu/uiinput.h2
3 files changed, 15 insertions, 0 deletions
diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp
index 577a0cb015d..304c365ac6a 100644
--- a/src/emu/ui/ui.cpp
+++ b/src/emu/ui/ui.cpp
@@ -1755,6 +1755,9 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
machine.schedule_load(filename);
}
+ // avoid handling the name of the save state slot as a seperate input
+ machine.ui_input().mark_all_as_pressed();
+
// remove the pause and reset the state
machine.resume();
return UI_HANDLER_CANCEL;
diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp
index 6b26bb323b5..b1ee53a697b 100644
--- a/src/emu/uiinput.cpp
+++ b/src/emu/uiinput.cpp
@@ -324,3 +324,13 @@ void ui_input_manager::push_char_event(render_target* target, unicode_char ch)
event.ch = ch;
push_event(event);
}
+
+/*-------------------------------------------------
+ mark_all_as_pressed - marks all buttons
+ as if they were already pressed once
+-------------------------------------------------*/
+void ui_input_manager::mark_all_as_pressed()
+{
+ for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++)
+ m_next_repeat[code] = osd_ticks();
+}
diff --git a/src/emu/uiinput.h b/src/emu/uiinput.h
index 2e89a0c413a..ff4137faf74 100644
--- a/src/emu/uiinput.h
+++ b/src/emu/uiinput.h
@@ -86,6 +86,8 @@ public:
void push_mouse_double_click_event(render_target* target, INT32 x, INT32 y);
void push_char_event(render_target* target, unicode_char ch);
+ void mark_all_as_pressed();
+
private:
// internal state