diff options
Diffstat (limited to 'src/mame/drivers/alg.c')
-rw-r--r-- | src/mame/drivers/alg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mame/drivers/alg.c b/src/mame/drivers/alg.c index 3284f16dc9a..5fe9ec1886c 100644 --- a/src/mame/drivers/alg.c +++ b/src/mame/drivers/alg.c @@ -22,6 +22,7 @@ #include "driver.h" #include "render.h" +#include "deprecat.h" #include "includes/amiga.h" #include "machine/laserdsc.h" @@ -50,8 +51,8 @@ static int get_lightgun_pos(const device_config *screen, int player, int *x, int { const rectangle *visarea = video_screen_get_visible_area(screen); - int xpos = readinputportbytag_safe((player == 0) ? "GUN1X" : "GUN2X", -1); - int ypos = readinputportbytag_safe((player == 0) ? "GUN1Y" : "GUN2Y", -1); + int xpos = input_port_read_safe(screen->machine, (player == 0) ? "GUN1X" : "GUN2X", -1); + int ypos = input_port_read_safe(screen->machine, (player == 0) ? "GUN1Y" : "GUN2Y", -1); if (xpos == -1 || ypos == -1) return FALSE; @@ -251,14 +252,14 @@ static CUSTOM_INPUT( lightgun_pos_r ) static CUSTOM_INPUT( lightgun_trigger_r ) { /* read the trigger control based on the input select */ - return (readinputportbytag("TRIGGERS") >> input_select) & 1; + return (input_port_read(machine, "TRIGGERS") >> input_select) & 1; } static CUSTOM_INPUT( lightgun_holster_r ) { /* read the holster control based on the input select */ - return (readinputportbytag("TRIGGERS") >> (2 + input_select)) & 1; + return (input_port_read(machine, "TRIGGERS") >> (2 + input_select)) & 1; } @@ -287,7 +288,7 @@ static void alg_cia_0_porta_w(UINT8 data) static UINT8 alg_cia_0_porta_r(void) { - return readinputportbytag("FIRE") | 0x3f; + return input_port_read(Machine, "FIRE") | 0x3f; } |