fix bugs in game_handle_input_mouse

This commit is contained in:
IntelOrca 2014-04-28 02:35:23 +01:00
parent f50c2a4445
commit 077d3b9d90
1 changed files with 3 additions and 3 deletions

View File

@ -309,7 +309,7 @@ static void game_handle_input_mouse(int x, int y, int state)
window_close_by_id(5, 0);
if (w != NULL)
window_bring_to_front(w);
w = window_bring_to_front(w);
if (widgetIndex == -1)
break;
@ -635,7 +635,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex)
if (w == NULL)
return;
window_bring_to_front(w);
w = window_bring_to_front(w);
if (widgetIndex == -1)
return;
@ -684,7 +684,7 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex)
RCT2_GLOBAL(RCT2_ADDRESS_INPUT_STATE, uint8) = INPUT_STATE_SCROLL_LEFT;
RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WIDGETINDEX, uint16) = widgetIndex;
RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWCLASS, rct_windowclass) = windowClass;
RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windowclass) = windowNumber;
RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DOWN_WINDOWNUMBER, rct_windownumber) = windowNumber;
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_CURSOR_X, uint16) = x;
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_CURSOR_Y, uint16) = y;