diff options
| author | Juan Linietsky | 2014-12-15 15:42:58 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-12-15 15:42:58 -0300 |
| commit | 089d7fa171e3a3305991047e82b4043d4f05783f (patch) | |
| tree | a41af5ab93f6d745962e471da8dc6003e6b8e430 /core/math | |
| parent | be4e40e90a5a322f6a7cec4893854ef5b15db600 (diff) | |
| download | godot-089d7fa171e3a3305991047e82b4043d4f05783f.tar.gz godot-089d7fa171e3a3305991047e82b4043d4f05783f.tar.zst godot-089d7fa171e3a3305991047e82b4043d4f05783f.zip | |
Small batch of fixes
-=-=-=-=-=-=-=-=-=-=
-Fixed looping error in AudioStreamResampled
-winrt port progress
-fixes in material in ambient light
Diffstat (limited to 'core/math')
| -rw-r--r-- | core/math/math_funcs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h index c98a08891..28a841332 100644 --- a/core/math/math_funcs.h +++ b/core/math/math_funcs.h @@ -136,7 +136,10 @@ public: static int b; -#if defined(_MSC_VER) && _MSC_VER < 1800 +#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603 // windows 8? + b = (int)((a>0.0f) ? (a + 0.5f):(a -0.5f)); + +#elif defined(_MSC_VER) && _MSC_VER < 1800 __asm fld a __asm fistp b /*#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) @@ -147,6 +150,7 @@ public: "fistpl %0 \n\t" : "=m" (b) : "m" (a));*/ + #else b=lrintf(a); //assuming everything but msvc 2012 or earlier has lrint #endif |
