diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-09 00:08:19 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-09 00:08:19 +0400 |
commit | c8b4cf92067ffeb625aa39003baf5d8f7c3f0025 (patch) | |
tree | c6c50dbc3d90a65fca6c1ca56a93e4a57cf7e154 /source/creator/creator.c | |
parent | e93db433a086a3e739c0f4026cd500f0b595b0f1 (diff) | |
parent | d76a6f5231c015c35123d22e1f5c3ffcdfbf9bbd (diff) |
2.50:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD
Notes:
* Game and sequencer RNA, and sequencer header are now out of date
a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
not needed anymore.
* Fix "duplicate strip" always increase the user count for ipo.
* IPO pinning on sequencer strips was lost during Undo.
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 2ac65f7a08a..5ffce91ec2d 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -497,6 +497,19 @@ 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)) +#if defined(FREE_WINDOWS) + putenv("SDL_VIDEODRIVER=dummy"); +#else + _putenv_s("SDL_VIDEODRIVER", "dummy"); +#endif +#else +#ifdef __sgi + putenv("SDL_VIDEODRIVER=dummy"); +#else + setenv("SDL_VIDEODRIVER", "dummy", 1); /* initializing the video driver can cause crashes on some systems - Campbell */ +#endif +#endif #ifdef __linux__ /* On linux the default SDL driver dma often would not play * use alsa if none is set */ @@ -616,8 +629,10 @@ int main(int argc, char **argv) Scene *scene= CTX_data_scene(C); if (a < argc) { - int frame= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); - Render *re= RE_NewRender(scene->id.name); + int frame = atoi(argv[a]); + Render *re = RE_NewRender(scene->id.name); + + frame = MIN2(MAXFRAME, MAX2(1, frame)); #ifndef DISABLE_PYTHON if (G.f & G_DOSCRIPTLINKS) BPY_do_all_scripts(SCRIPT_RENDER, 0); @@ -657,8 +672,10 @@ int main(int argc, char **argv) a++; if (CTX_data_scene(C)) { Scene *scene= CTX_data_scene(C); - int frame= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); - if (a < argc) (scene->r.sfra) = frame; + if (a < argc) { + int frame = atoi(argv[a]); + (scene->r.sfra) = MIN2(MAXFRAME, MAX2(1, frame)); + } } else { printf("\nError: no blend loaded. cannot use '-s'.\n"); } @@ -667,8 +684,10 @@ int main(int argc, char **argv) a++; if (CTX_data_scene(C)) { Scene *scene= CTX_data_scene(C); - int frame= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); - if (a < argc) (scene->r.efra) = frame; + if (a < argc) { + int frame = atoi(argv[a]); + (scene->r.efra) = MIN2(MAXFRAME, MAX2(1, frame)); + } } else { printf("\nError: no blend loaded. cannot use '-e'.\n"); } @@ -677,8 +696,10 @@ int main(int argc, char **argv) a++; if (CTX_data_scene(C)) { Scene *scene= CTX_data_scene(C); - int fstep= MIN2(MAXFRAME, MAX2(1, atoi(argv[a]))); - if (a < argc) (scene->frame_step) = fstep; + if (a < argc) { + int frame = atoi(argv[a]); + (scene->frame_step) = MIN2(MAXFRAME, MAX2(1, frame)); + } } else { printf("\nError: no blend loaded. cannot use '-j'.\n"); } |