From 9feff63c6d6086e6b3653bb42ab80a3a021b83b3 Mon Sep 17 00:00:00 2001 From: Maikel Stuivenberg Date: Sun, 28 Jun 2015 13:36:46 +0200 Subject: [PATCH] Remove viewport flag --- src/interface/keyboard_shortcut.c | 8 ++++---- src/interface/viewport.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/interface/keyboard_shortcut.c b/src/interface/keyboard_shortcut.c index 6aa94b916a..be2e210dcc 100644 --- a/src/interface/keyboard_shortcut.c +++ b/src/interface/keyboard_shortcut.c @@ -230,13 +230,13 @@ static void shortcut_remove_vertical_land_toggle() static void shortcut_remove_top_bottom_toolbar_toggle() { - toggle_view_flag(VIEWPORT_FLAG_HIDE_TOP_BOTTOM_TOOLBAR); - - if (window_get_main()->viewport->flags & VIEWPORT_FLAG_HIDE_TOP_BOTTOM_TOOLBAR){ + if (window_find_by_class(WC_TOP_TOOLBAR) != NULL) + { window_close(window_find_by_class(WC_TOP_TOOLBAR)); window_close(window_find_by_class(WC_BOTTOM_TOOLBAR)); } - else { + else + { window_top_toolbar_open(); window_game_bottom_toolbar_open(); } diff --git a/src/interface/viewport.h b/src/interface/viewport.h index 5836314b0a..62cfa47c7f 100644 --- a/src/interface/viewport.h +++ b/src/interface/viewport.h @@ -41,7 +41,7 @@ enum { VIEWPORT_FLAG_HIDE_BASE = (1 << 12), VIEWPORT_FLAG_HIDE_VERTICAL = (1 << 13), VIEWPORT_FLAG_INVISIBLE_SPRITES = (1 << 14), - VIEWPORT_FLAG_HIDE_TOP_BOTTOM_TOOLBAR = (1 << 15), + VIEWPORT_FLAG_15 = (1 << 15) }; enum {