From: Holger Schemel Date: Fri, 18 Dec 2020 01:12:55 +0000 (+0100) Subject: added variable to store if request dialog event was processed X-Git-Tag: 4.2.2.0~4 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=fa1cf5ef4a93a5e1202a4a4af019af2477708906 added variable to store if request dialog event was processed --- diff --git a/src/tools.c b/src/tools.c index 8a2d895a..7eb43211 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4238,6 +4238,8 @@ static int RequestHandleEvents(unsigned int req_state) while (result < 0) { + boolean event_handled = FALSE; + if (game_just_ended) { SetDrawtoField(draw_buffer_last); @@ -4259,6 +4261,8 @@ static int RequestHandleEvents(unsigned int req_state) while (NextValidEvent(&event)) { + event_handled = TRUE; + switch (event.type) { case EVENT_BUTTONPRESS: @@ -4513,12 +4517,15 @@ static int RequestHandleEvents(unsigned int req_state) } } - if (game_just_ended) + if (event_handled) { - if (global.use_envelope_request) + if (game_just_ended) { - // copy back current state of pressed buttons inside request area - BlitBitmap(drawto, bitmap_db_store_2, sx, sy, width, height, sx, sy); + if (global.use_envelope_request) + { + // copy back current state of pressed buttons inside request area + BlitBitmap(drawto, bitmap_db_store_2, sx, sy, width, height, sx, sy); + } } }