summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2016-06-24 00:12:02 +0200
committer angelosa <salese_corp_ltd@email.it>2016-06-24 00:12:02 +0200
commit5ece80fe5d693a022e4584f5f9c6dd57d3802a24 (patch)
tree8d6fc185055b0ee2fa13d417858c03b3231468ea
parent7a6d73d548bc835cf21fc55f90a1d83c380e8eb4 (diff)
Added "return to origin point (0,0)" feature to Tilemap Viewer (tied with HOME key) [Angelo Salese]
-rw-r--r--src/frontend/mame/ui/viewgfx.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/frontend/mame/ui/viewgfx.cpp b/src/frontend/mame/ui/viewgfx.cpp
index 7a416b0704d..8e55b8ac86f 100644
--- a/src/frontend/mame/ui/viewgfx.cpp
+++ b/src/frontend/mame/ui/viewgfx.cpp
@@ -1097,6 +1097,14 @@ static void tilemap_handle_keys(running_machine &machine, ui_gfx_state &state, i
state.bitmap_dirty = true;
}
+ // return to (0,0) (HOME)
+ if( machine.ui_input().pressed(IPT_UI_HOME))
+ {
+ state.tilemap.xoffs = 0;
+ state.tilemap.yoffs = 0;
+ state.bitmap_dirty = true;
+ }
+
// handle navigation (up,down,left,right)
step = 8;
if (machine.input().code_pressed(KEYCODE_LSHIFT)) step = 1;