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:
-rw-r--r--release/scripts/templates/background_job.py2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp18
2 files changed, 16 insertions, 4 deletions
diff --git a/release/scripts/templates/background_job.py b/release/scripts/templates/background_job.py
index 90ddba8a91d..5cc2e04db0b 100644
--- a/release/scripts/templates/background_job.py
+++ b/release/scripts/templates/background_job.py
@@ -84,8 +84,6 @@ def main():
usage_text = "Run blender in background mode with this script:"
usage_text += " blender --background --python " + __file__ + " -- [options]"
- print(usage_text)
-
parser = argparse.ArgumentParser(description=usage_text)
# Example background utility, add some text and renders or saves it (with options)
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 767ccff4259..65a68f1bac3 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -115,6 +115,12 @@ const int kMinWindowHeight = 100;
char bprogname[FILE_MAX];
+static void mem_error_cb(const char *errorStr)
+{
+ fprintf(stderr, "%s", errorStr);
+ fflush(stderr);
+}
+
#ifdef WIN32
typedef enum
{
@@ -834,9 +840,10 @@ int main(int argc, char** argv)
// GPG_Application app (system, maggie, startscenename);
app.SetGameEngineData(maggie, scene, argc, argv); /* this argc cant be argc_py_clamped, since python uses it */
-
BLI_strncpy(pathname, maggie->name, sizeof(pathname));
- BLI_strncpy(G.main->name, maggie->name, sizeof(G.main->name));
+ if(G.main != maggie) {
+ BLI_strncpy(G.main->name, maggie->name, sizeof(G.main->name));
+ }
#ifdef WITH_PYTHON
setGamePythonPath(G.main->name);
#endif
@@ -956,6 +963,13 @@ int main(int argc, char** argv)
SYS_DeleteSystem(syshandle);
+ int totblock= MEM_get_memory_blocks_in_use();
+ if(totblock!=0) {
+ printf("Error Totblock: %d\n",totblock);
+ MEM_set_error_callback(mem_error_cb);
+ MEM_printmemlist();
+ }
+
return error ? -1 : 0;
}