diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-24 17:48:10 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-24 17:48:10 +0300 |
commit | faec4309147988fbab7b7d7ec661f5130358d169 (patch) | |
tree | 0c839f8f88fe80f4a3762980adb5efe729ce1b44 /source/gameengine | |
parent | f85745b17bfe68673bf5f799e98c617d9471ddf1 (diff) | |
parent | e1dd83b399d46d81ea51f6c41725eec5c1a1db7a (diff) |
Merge branch 'master' into blender2.8
Conflicts:
intern/cycles/blender/blender_curves.cpp
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/transform/transform_snap_object.c
source/blender/editors/util/undo.c
source/blender/makesrna/intern/rna_object_force.c
Diffstat (limited to 'source/gameengine')
5 files changed, 60 insertions, 6 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index ec99de45918..14dc0d71b83 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -281,7 +281,8 @@ static std::map<int, SCA_IInputDevice::KX_EnumInputs> create_translate_table() m[QUOTEKEY ] = SCA_IInputDevice::KX_QUOTEKEY; m[ACCENTGRAVEKEY ] = SCA_IInputDevice::KX_ACCENTGRAVEKEY; m[MINUSKEY ] = SCA_IInputDevice::KX_MINUSKEY; - m[SLASHKEY ] = SCA_IInputDevice::KX_SLASHKEY; + m[PLUSKEY ] = SCA_IInputDevice::KX_PLUSKEY; + m[SLASHKEY ] = SCA_IInputDevice::KX_SLASHKEY; m[BACKSLASHKEY ] = SCA_IInputDevice::KX_BACKSLASHKEY; m[EQUALKEY ] = SCA_IInputDevice::KX_EQUALKEY; m[LEFTBRACKETKEY ] = SCA_IInputDevice::KX_LEFTBRACKETKEY; diff --git a/source/gameengine/GameLogic/SCA_IInputDevice.h b/source/gameengine/GameLogic/SCA_IInputDevice.h index d4cd66fb564..f306ae4f26b 100644 --- a/source/gameengine/GameLogic/SCA_IInputDevice.h +++ b/source/gameengine/GameLogic/SCA_IInputDevice.h @@ -129,6 +129,7 @@ public: KX_COMMAKEY = 44, KX_MINUSKEY = 45, KX_PERIODKEY = 46, + KX_PLUSKEY = 47, KX_ZEROKEY = 48, KX_ONEKEY, // =49 diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index 283f222115c..6c09af33f9e 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -77,6 +77,10 @@ set(SRC add_definitions(${GL_DEFINITIONS}) +if(WIN32) + blender_include_dirs(../../../../intern/utfconv) +endif() + if(WITH_CODEC_FFMPEG) add_definitions(-DWITH_FFMPEG) endif() diff --git a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp index 53d03c6f479..eefaa3730cf 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp @@ -141,6 +141,7 @@ GPG_KeyboardDevice::GPG_KeyboardDevice(void) m_reverseKeyTranslateTable[GHOST_kKeyQuote ] = KX_QUOTEKEY ; m_reverseKeyTranslateTable[GHOST_kKeyAccentGrave ] = KX_ACCENTGRAVEKEY ; m_reverseKeyTranslateTable[GHOST_kKeyMinus ] = KX_MINUSKEY ; + m_reverseKeyTranslateTable[GHOST_kKeyPlus ] = KX_PLUSKEY ; m_reverseKeyTranslateTable[GHOST_kKeySlash ] = KX_SLASHKEY ; m_reverseKeyTranslateTable[GHOST_kKeyBackslash ] = KX_BACKSLASHKEY ; m_reverseKeyTranslateTable[GHOST_kKeyEqual ] = KX_EQUALKEY ; diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index a69a8eae55d..ac2e4dfa563 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -116,10 +116,14 @@ extern char datatoc_bmonofont_ttf[]; #include "RNA_define.h" #ifdef WIN32 -#include <windows.h> -#if !defined(DEBUG) -#include <wincon.h> -#endif // !defined(DEBUG) +# include <windows.h> +# if !defined(DEBUG) +# include <wincon.h> +# endif // !defined(DEBUG) +# if defined(_MSC_VER) && defined(_M_X64) +# include <math.h> /* needed for _set_FMA3_enable */ +# endif +# include "utfconv.h" #endif // WIN32 #ifdef WITH_SDL_DYNLOAD @@ -399,7 +403,14 @@ static int GPG_PyNextFrame(void *state0) } } -int main(int argc, char** argv) +int main( + int argc, +#ifdef WIN32 + char **UNUSED(argv_c) +#else + char **argv +#endif + ) { int i; int argc_py_clamped= argc; /* use this so python args can be added after ' - ' */ @@ -434,6 +445,34 @@ int main(int argc, char** argv) bool samplesParFound = false; GHOST_TUns16 aasamples = 0; +#ifdef WIN32 + char **argv; + int argv_num; + + /* We delay loading of openmp so we can set the policy here. */ +# if defined(_MSC_VER) + _putenv_s("OMP_WAIT_POLICY", "PASSIVE"); +# endif + + /* FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1). Just disable it. */ +# if defined(_MSC_VER) && defined(_M_X64) + _set_FMA3_enable(0); +# endif + + /* Win32 Unicode Args */ + /* NOTE: cannot use guardedalloc malloc here, as it's not yet initialized + * (it depends on the args passed in, which is what we're getting here!) + */ + { + wchar_t **argv_16 = CommandLineToArgvW(GetCommandLineW(), &argc); + argv = (char**)malloc(argc * sizeof(char *)); + for (argv_num = 0; argv_num < argc; argv_num++) { + argv[argv_num] = alloc_utf_8_from_16(argv_16[argv_num], 0); + } + LocalFree(argv_16); + } +#endif /* WIN32 */ + #ifdef __linux__ #ifdef __alpha__ signal (SIGFPE, SIG_IGN); @@ -1165,5 +1204,13 @@ int main(int argc, char** argv) BKE_tempdir_session_purge(); +#ifdef WIN32 + while (argv_num) { + free(argv[--argv_num]); + } + free(argv); + argv = NULL; +#endif + return error ? -1 : 0; } |