From a319bb15e2c60a6c596b1f83b07a2e27338e6a60 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Tue, 16 Dec 2014 11:37:46 +0000 Subject: [PATCH] fix compile error for GCC --- src/windows/editor_inventions_list.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/windows/editor_inventions_list.c b/src/windows/editor_inventions_list.c index 851f206f36..0d94c6f080 100644 --- a/src/windows/editor_inventions_list.c +++ b/src/windows/editor_inventions_list.c @@ -592,7 +592,7 @@ static void window_editor_inventions_list_cursor() rct_window *w; rct_research_item *researchItem; short widgetIndex, x, y; - int scrollIndex; + int scrollIndex, cursorId; window_cursor_get_registers(w, widgetIndex, x, y); @@ -601,7 +601,8 @@ static void window_editor_inventions_list_cursor() } else if (widgetIndex == WIDX_RESEARCH_ORDER_SCROLL) { scrollIndex = 1; } else { - window_cursor_set_registers(-1); + cursorId = -1; + window_cursor_set_registers(cursorId); return; } @@ -610,11 +611,13 @@ static void window_editor_inventions_list_cursor() return; if (researchItem->entryIndex < (uint32)-3 && research_item_is_always_researched(researchItem)) { - window_cursor_set_registers(-1); + cursorId = -1; + window_cursor_set_registers(cursorId); return; } - window_cursor_set_registers(CURSOR_HAND_OPEN); + cursorId = CURSOR_HAND_OPEN; + window_cursor_set_registers(cursorId); } /** @@ -846,6 +849,7 @@ static void window_editor_inventions_list_drag_cursor() rct_window *w, *inventionListWindow; rct_research_item *researchItem; short widgetIndex, x, y; + int cursorId; window_cursor_get_registers(w, widgetIndex, x, y); @@ -858,7 +862,8 @@ static void window_editor_inventions_list_drag_cursor() } } - window_cursor_set_registers(CURSOR_HAND_CLOSED); + cursorId = CURSOR_HAND_CLOSED; + window_cursor_set_registers(cursorId); } /**