mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
[DSOUND]
Extend the lrint MSVC hack to support x64 as well See http://sourceforge.net/p/freeimage/discussion/36111/thread/b43c17c5 svn path=/trunk/; revision=60142
This commit is contained in:
parent
d12cda0252
commit
6ecfff267a
1 changed files with 10 additions and 1 deletions
|
@ -64,17 +64,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
|
|||
#endif
|
||||
|
||||
/* This is an inlined version of lrintf. */
|
||||
#if defined(_M_IX86) && defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_M_AMD64)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
|
||||
FORCEINLINE
|
||||
int
|
||||
lrintf(float f)
|
||||
{
|
||||
#if defined(_M_IX86)
|
||||
int result;
|
||||
__asm
|
||||
{
|
||||
fld f;
|
||||
fistp result;
|
||||
}
|
||||
return result;
|
||||
#elif defined(_M_AMD64)
|
||||
return _mm_cvtss_si32(_mm_load_ss(&f));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue