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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 8c2272e4707..534bfdc369e 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -32,8 +32,8 @@
#include <stdio.h>
#include <string.h>
-#if WIN32
-#include <Windows.h>
+#ifdef WIN32
+# include <Windows.h>
#endif
#include "MEM_guardedalloc.h"
@@ -67,7 +67,6 @@
#include "BKE_tracking.h" /* free tracking clipboard */
#include "BLI_listbase.h"
-#include "BLI_math_color.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
@@ -115,6 +114,8 @@
#include "BKE_sound.h"
#include "COM_compositor.h"
+#include "IMB_colormanagement.h"
+
static void wm_init_reports(bContext *C)
{
BKE_reports_init(CTX_wm_reports(C), RPT_STORE);
@@ -143,15 +144,18 @@ void WM_init(bContext *C, int argc, const char **argv)
ED_spacetypes_init(); /* editors/space_api/spacetype.c */
+ /* initialize color management stuff
+ * do this before ED_file_init because that function would load images,
+ * so at least default byte color space should be already known
+ */
+ IMB_colormanagement_init();
+
ED_file_init(); /* for fsmenu */
ED_node_init_butfuncs();
BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */
BLF_lang_init();
- /* initialize color stuff */
- BLI_init_srgb_conversion();
-
/* get the default database, plus a wm */
WM_homefile_read(C, NULL, G.factory_startup);
@@ -338,9 +342,8 @@ static void free_openrecent(void)
extern void free_anim_copybuf(void);
extern void free_anim_drivers_copybuf(void);
extern void free_fmodifiers_copybuf(void);
-extern void free_posebuf(void);
-#if WIN32
+#ifdef WIN32
/* Read console events until there is a key event. Also returns on any error. */
static void wait_for_console_key(void)
{
@@ -371,6 +374,8 @@ void WM_exit_ext(bContext *C, const short do_python)
sound_exit();
+ IMB_colormanagement_exit();
+
/* first wrap up running stuff, we assume only the active WM is running */
/* modal handlers are on window level freed, others too? */
/* note; same code copied in wm_files.c */
@@ -421,7 +426,7 @@ void WM_exit_ext(bContext *C, const short do_python)
free_anim_copybuf();
free_anim_drivers_copybuf();
free_fmodifiers_copybuf();
- free_posebuf();
+ ED_clipboard_posebuf_free();
BKE_node_clipboard_clear();
BLF_exit();