[Bf-blender-cvs] [e67bd30] master: BGE: python API cleanup - replace BLI_program_path with BKE_appdir_program_path

Ines Almeida noreply at git.blender.org
Tue Feb 3 16:49:10 CET 2015


Commit: e67bd30bdf9282f01f5bc3c44503aa496127c582
Author: Ines Almeida
Date:   Mon Jan 12 15:59:02 2015 +0100
Branches: master
https://developer.blender.org/rBe67bd30bdf9282f01f5bc3c44503aa496127c582

BGE: python API cleanup - replace BLI_program_path with BKE_appdir_program_path

===================================================================

M	source/gameengine/Ketsji/KX_PythonInit.cpp

===================================================================

diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 26b9561..3e207a0 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -2097,7 +2097,7 @@ PyObject *initGamePlayerPythonScripting(Main *maggie, int argc, char** argv)
 
 	/* not essential but nice to set our name */
 	static wchar_t program_path_wchar[FILE_MAX]; /* python holds a reference */
-	BLI_strncpy_wchar_from_utf8(program_path_wchar, BLI_program_path(), sizeof(program_path_wchar) / sizeof(wchar_t));
+	BLI_strncpy_wchar_from_utf8(program_path_wchar, BKE_appdir_program_path(), ARRAY_SIZE(program_path_wchar));
 	Py_SetProgramName(program_path_wchar);
 
 	/* Update, Py3.3 resolves attempting to parse non-existing header */
@@ -2198,9 +2198,10 @@ PyObject *initGamePythonScripting(Main *maggie)
 {
 	/* not essential but nice to set our name */
 	static wchar_t program_path_wchar[FILE_MAX]; /* python holds a reference */
-	BLI_strncpy_wchar_from_utf8(program_path_wchar, BLI_program_path(), sizeof(program_path_wchar) / sizeof(wchar_t));
+	BLI_strncpy_wchar_from_utf8(program_path_wchar, BKE_appdir_program_path(), ARRAY_SIZE(program_path_wchar));
 	Py_SetProgramName(program_path_wchar);
 
+
 #ifdef WITH_AUDASPACE
 	/* accessing a SoundActuator's sound results in a crash if aud is not initialized... */
 	{




More information about the Bf-blender-cvs mailing list