]> git.lizzy.rs Git - irrlicht.git/commitdiff
Get rid of ancient workaround
authorsfan5 <sfan5@live.de>
Sat, 22 Jan 2022 20:00:54 +0000 (21:00 +0100)
committersfan5 <sfan5@live.de>
Sat, 22 Jan 2022 20:01:17 +0000 (21:01 +0100)
...that probably negatively impacted performance or something else

source/Irrlicht/os.cpp

index 684205739432e3d300f1c4f52ae645a2374dc4f2..d26830db22dd1c8d28e9058f0a5b82337c877ca2 100644 (file)
@@ -94,16 +94,9 @@ namespace os
 \r
        static LARGE_INTEGER HighPerformanceFreq;\r
        static BOOL HighPerformanceTimerSupport = FALSE;\r
-       static BOOL MultiCore = FALSE;\r
 \r
        void Timer::initTimer(bool usePerformanceTimer)\r
        {\r
-#if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_)\r
-               // workaround for hires timer on multiple core systems, bios bugs result in bad hires timers.\r
-               SYSTEM_INFO sysinfo;\r
-               GetSystemInfo(&sysinfo);\r
-               MultiCore = (sysinfo.dwNumberOfProcessors > 1);\r
-#endif\r
                if (usePerformanceTimer)\r
                        HighPerformanceTimerSupport = QueryPerformanceFrequency(&HighPerformanceFreq);\r
                else\r
@@ -115,24 +108,11 @@ namespace os
        {\r
                if (HighPerformanceTimerSupport)\r
                {\r
-#if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_)\r
-                       // Avoid potential timing inaccuracies across multiple cores by\r
-                       // temporarily setting the affinity of this process to one core.\r
-                       DWORD_PTR affinityMask=0;\r
-                       if(MultiCore)\r
-                               affinityMask = SetThreadAffinityMask(GetCurrentThread(), 1);\r
-#endif\r
                        LARGE_INTEGER nTime;\r
                        BOOL queriedOK = QueryPerformanceCounter(&nTime);\r
 \r
-#if !defined(_WIN32_WCE)  && !defined (_IRR_XBOX_PLATFORM_)\r
-                       // Restore the true affinity.\r
-                       if(MultiCore)\r
-                               (void)SetThreadAffinityMask(GetCurrentThread(), affinityMask);\r
-#endif\r
                        if(queriedOK)\r
                                return u32((nTime.QuadPart) * 1000 / HighPerformanceFreq.QuadPart);\r
-\r
                }\r
 \r
                return GetTickCount();\r