[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19927] trunk/blender/source/creator/ creator.c: Amendment for 19924 - no setenv() on Windows, make it work with _putenv_s().

Nathan Letwory jesterking at letwory.net
Sat Apr 25 22:26:27 CEST 2009


Revision: 19927
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19927
Author:   jesterking
Date:     2009-04-25 22:26:27 +0200 (Sat, 25 Apr 2009)

Log Message:
-----------
Amendment for 19924 - no setenv() on Windows, make it work with _putenv_s().

Modified Paths:
--------------
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c	2009-04-25 17:52:04 UTC (rev 19926)
+++ trunk/blender/source/creator/creator.c	2009-04-25 20:26:27 UTC (rev 19927)
@@ -538,7 +538,11 @@
 		BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */
 
 #ifndef DISABLE_SDL
+#ifndef WIN32
 		setenv("SDL_VIDEODRIVER", "dummy", 1); /* initializing the video driver can cause crashes on some systems - Campbell */
+#else
+		_putenv_s("SDL_VIDEODRIVER", "dummy");
+#endif
 #ifdef __linux__
 		/* On linux the default SDL driver dma often would not play
 		 * use alsa if none is set */





More information about the Bf-blender-cvs mailing list