From f021d467526af3f3fc839c0ca48acc61dd781d56 Mon Sep 17 00:00:00 2001 From: Shrey Aggarwal Date: Tue, 8 Feb 2022 17:40:48 -0700 Subject: Cleanup: GHOST_ISystem::toggleConsole API GHOST_ISystem::toggleConsole had a somewhat misleading name it could be fed 4 different values, so it was not as much a toggle as a set console window state. This change renames `toggleConsole` to a more appropriately named `setConsoleWindowState` and replaces the integer it had to an enum so it's easy to tell what is being asked of it at the call site. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D14020 --- source/blender/windowmanager/intern/wm_init_exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_init_exit.c') diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 1d26c58bcf9..cff4287a2d0 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -356,10 +356,10 @@ void WM_init(bContext *C, int argc, const char **argv) if (!G.background) { if (wm_start_with_console) { - GHOST_toggleConsole(1); + setConsoleWindowState(GHOST_kConsoleWindowStateShow); } else { - GHOST_toggleConsole(3); + setConsoleWindowState(GHOST_kConsoleWindowStateHideForNonConsoleLaunch); } } -- cgit v1.2.3