From 14953bd05038722b9f8af90846e76cdaed72d15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Banaan=20Ananas?= Date: Sat, 26 Feb 2011 16:17:17 +0000 Subject: [PATCH] fix global flipscreen. -- Due to updateflip _always_ flipping visarea when flip is set (confusing!), visarea X was flipped twice when globally going from off->on, causing broken cocktail mode in a bunch of drivers (galaga, digdug, warpwarp, ..). This symptom turned up when these drivers were updated with 'raw' screen params, causing visarea-1 != screen width/height due to blanking area info inside width/height. --- src/emu/video/generic.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/emu/video/generic.c b/src/emu/video/generic.c index a654f957f59..f76c2e81dba 100644 --- a/src/emu/video/generic.c +++ b/src/emu/video/generic.c @@ -445,8 +445,14 @@ static void updateflip(running_machine *machine) void flip_screen_set(running_machine *machine, int on) { - flip_screen_x_set(machine, on); - flip_screen_y_set(machine, on); + generic_video_private *state = machine->generic_video_data; + if (on) on = ~0; + if (state->flip_screen_x != on || state->flip_screen_y != on) + { + if (!on) updateflip(machine); // flip visarea back + state->flip_screen_x = state->flip_screen_y = on; + updateflip(machine); + } } @@ -463,6 +469,7 @@ void flip_screen_set_no_update(running_machine *machine, int on) * bypass update_flip */ generic_video_private *state = machine->generic_video_data; + if (on) on = ~0; state->flip_screen_x = on; }