friend with UNICODE macro on windows
This commit is contained in:
@@ -137,7 +137,7 @@ PIInit::PIInit() {
|
||||
if (__pi_perf_freq == 0) __pi_perf_freq = -1;
|
||||
|
||||
// Sleep precision init
|
||||
PRIVATE->ntlib = LoadLibrary("ntdll.dll");
|
||||
PRIVATE->ntlib = LoadLibraryA("ntdll.dll");
|
||||
if (PRIVATE->ntlib) {
|
||||
getTimerResolutionAddr = (PINtQueryTimerResolution)GetProcAddress(PRIVATE->ntlib, "NtQueryTimerResolution");
|
||||
setTimerResolutionAddr = (PINtSetTimerResolution)GetProcAddress(PRIVATE->ntlib, "NtSetTimerResolution");
|
||||
@@ -221,7 +221,7 @@ PIInit::PIInit() {
|
||||
LocalFree(argv_);
|
||||
memset(cbuff, 0, 1024);
|
||||
ulong unlen = 1023;
|
||||
if (GetUserName(cbuff, &unlen) != 0)
|
||||
if (GetUserNameA(cbuff, &unlen) != 0)
|
||||
sinfo->user = cbuff;
|
||||
#else //WINDOWS
|
||||
sinfo->processorsCount = piMaxi(1, int(sysconf(_SC_NPROCESSORS_ONLN)));
|
||||
|
||||
Reference in New Issue
Block a user