Chore: uses _WIN32 always

This commit is contained in:
李通洲
2025-12-02 15:37:30 +08:00
parent 19f30ec687
commit 3e22dd4b0e
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ static void defaultConfig(void)
void ffInitInstance(void)
{
#ifdef WIN32
#ifdef _WIN32
// https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?source=recommendat>
setlocale(LC_ALL, ".UTF8");
#else
+1 -1
View File
@@ -14,7 +14,7 @@
#include <ctype.h>
#include <string.h>
#ifdef WIN32
#ifdef _WIN32
#include "util/windows/getline.h"
#endif
+2 -2
View File
@@ -28,7 +28,7 @@ bool ffPrintCPUUsage(FFCPUUsageOptions* options)
{
sumValue += *percent;
#if WIN32
#if _WIN32
// Windows may return values greater than 100%, cap them to 100%
if (*percent > 100) *percent = 100;
#endif
@@ -48,7 +48,7 @@ bool ffPrintCPUUsage(FFCPUUsageOptions* options)
++index;
}
double avgValue = sumValue / (double) valueCount;
#if WIN32
#if _WIN32
// See above comment
if (avgValue > 100) avgValue = 100;
#endif