From e87447e37d80a26df102a85dcc5e46bdafd5571d Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 20 Nov 2019 03:55:28 +1100 Subject: UI: when modifying an input mapping, only cycle default/none if UI_CANCEL is the first thing pressed (nw) It's annoying that if you accidentally start to change an input, there's no way to back out at all. You need to press something before it will do anything. Also, if you go to add an additional "or" combination and press the wrong thing, you can't back out just the change - hitting UI_CANCEL takes you back to the default. This at least partially addresses it: if you hit UI_SELECT to modify an input then hit UI_CANCEL immediately, it will cycle default/none; however if you press any other input first and then hit UI_CANCEL, it will just back out the change. The implementation is a bit whacky at the moment, but doing better would require another emu.h change which I don't want to do right now. --- src/frontend/mame/ui/inputmap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/frontend/mame/ui/inputmap.h') diff --git a/src/frontend/mame/ui/inputmap.h b/src/frontend/mame/ui/inputmap.h index 4c6064f037b..bd96bbe7edc 100644 --- a/src/frontend/mame/ui/inputmap.h +++ b/src/frontend/mame/ui/inputmap.h @@ -70,6 +70,7 @@ private: input_item_data * lastitem; bool record_next; input_seq starting_seq; + input_seq init_poll_seq; virtual void custom_render(void *selectedref, float top, float bottom, float x1, float y1, float x2, float y2) override; virtual void handle() override; -- cgit v1.2.3