* fix linking problem for mingw with setenv/_putenv_s, here we use putenv("key=val");
authorNathan Letwory <nathan@letworyinteractive.com>
Wed, 29 Apr 2009 20:09:08 +0000 (20:09 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Wed, 29 Apr 2009 20:09:08 +0000 (20:09 +0000)
source/creator/creator.c

index a1531fd718076d74dc69d1e60d0b81e115d09cfa..2b542b13c9781e3c38d947061a2d0c800ea2c5cb 100644 (file)
@@ -538,8 +538,12 @@ int main(int argc, char **argv)
                BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */
 
 #ifndef DISABLE_SDL
-#if (defined(WIN32) || defined(WIN64)) && !defined(FREE_WINDOWS)
+#if (defined(WIN32) || defined(WIN64))
+#if defined(FREE_WINDOWS)
+               putenv("SDL_VIDEODRIVER=dummy");
+#else
                _putenv_s("SDL_VIDEODRIVER", "dummy");
+#endif
 #else
                setenv("SDL_VIDEODRIVER", "dummy", 1); /* initializing the video driver can cause crashes on some systems - Campbell */
 #endif