Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorShrey Aggarwal <shrey_agg>2022-02-09 03:40:48 +0300
committerRay Molenkamp <github@lazydodo.com>2022-02-09 03:40:48 +0300
commitf021d467526af3f3fc839c0ca48acc61dd781d56 (patch)
tree81828b22b50b8764a82fb05a9b9837b81cacc649 /source
parent452a7f673190e5161c96ec8a53631a1c89d127b9 (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c4
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
2 files changed, 3 insertions, 3 deletions
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);
}
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6c9b0af5186..2c82d8f5b6b 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2046,7 +2046,7 @@ static void WM_OT_quit_blender(wmOperatorType *ot)
static int wm_console_toggle_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
{
- GHOST_toggleConsole(2);
+ setConsoleWindowState(GHOST_kConsoleWindowStateToggle);
return OPERATOR_FINISHED;
}