diff --git a/FFmpegSource2/utils.cpp b/FFmpegSource2/utils.cpp index 8ca3d07ff..8a8b6e184 100644 --- a/FFmpegSource2/utils.cpp +++ b/FFmpegSource2/utils.cpp @@ -21,24 +21,25 @@ #include "utils.h" #include #include - #ifdef _MSC_VER # include -#else -# include #endif int GetCPUFlags() { +// FIXME Add proper feature detection when msvc isn't used + int Flags = PP_CPU_CAPS_MMX | PP_CPU_CAPS_MMX2; + +#ifdef _MSC_VER + Flags = 0; int CPUInfo[4]; __cpuid(CPUInfo, 0); - int Flags = 0; - // PP and SWS defines have the same values for their defines so this actually works if (CPUInfo[3] & (1 << 23)) Flags |= PP_CPU_CAPS_MMX; if (CPUInfo[3] & (1 << 25)) Flags |= PP_CPU_CAPS_MMX2; +#endif return Flags; }