From d219cccb495431386d7fb0334fbf661b6eb175eb Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 28 Oct 2009 16:53:19 +0000 Subject: [PATCH] fix 64bits compilation --- desmume/src/metaspu/SoundTouch/cpu_detect_x86_win.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desmume/src/metaspu/SoundTouch/cpu_detect_x86_win.cpp b/desmume/src/metaspu/SoundTouch/cpu_detect_x86_win.cpp index d8f9e58dd..4436b111a 100644 --- a/desmume/src/metaspu/SoundTouch/cpu_detect_x86_win.cpp +++ b/desmume/src/metaspu/SoundTouch/cpu_detect_x86_win.cpp @@ -71,6 +71,9 @@ uint detectCPUextensions(void) if (_dwDisabledISA == 0xffffffff) return 0; + //zeromus 28-oct-2009 - changed to compile on 64bits msvc +#if (defined(_MSC_VER) && !defined(_M_X64)) || !defined(_MSC_VER) + _asm { ; check if 'cpuid' instructions is available by toggling eflags bit 21 @@ -122,5 +125,7 @@ uint detectCPUextensions(void) mov res, esi } +#endif + return res & ~_dwDisabledISA; }