Browse Source

Minor clean-ups.

tags/2021-05-28
jules 13 years ago
parent
commit
03c81655c6
3 changed files with 9 additions and 8 deletions
  1. +5
    -4
      modules/juce_core/native/juce_win32_SystemStats.cpp
  2. +3
    -3
      modules/juce_core/native/juce_win32_Threads.cpp
  3. +1
    -1
      modules/juce_core/threads/juce_ThreadLocalValue.h

+ 5
- 4
modules/juce_core/native/juce_win32_SystemStats.cpp View File

@@ -180,18 +180,19 @@ String SystemStats::getOperatingSystemName()
bool SystemStats::isOperatingSystem64Bit()
{
#ifdef _WIN64
#if JUCE_64BIT
return true;
#else
typedef BOOL (WINAPI* LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress (GetModuleHandle (_T("kernel32")), "IsWow64Process");
LPFN_ISWOW64PROCESS fnIsWow64Process
= (LPFN_ISWOW64PROCESS) GetProcAddress (GetModuleHandleA ("kernel32"), "IsWow64Process");
BOOL isWow64 = FALSE;
return fnIsWow64Process != 0
return fnIsWow64Process != nullptr
&& fnIsWow64Process (GetCurrentProcess(), &isWow64)
&& (isWow64 != FALSE);
&& isWow64 != FALSE;
#endif
}


+ 3
- 3
modules/juce_core/native/juce_win32_Threads.cpp View File

@@ -287,7 +287,7 @@ static void* currentModuleHandle = nullptr;
void* Process::getCurrentModuleInstanceHandle() noexcept
{
if (currentModuleHandle == nullptr)
currentModuleHandle = GetModuleHandle (0);
currentModuleHandle = GetModuleHandleA (nullptr);
return currentModuleHandle;
}
@@ -319,8 +319,8 @@ void Process::terminate()
bool juce_IsRunningInWine()
{
HMODULE ntdll = GetModuleHandle (_T("ntdll.dll"));
return ntdll != 0 && GetProcAddress (ntdll, "wine_get_version") != 0;
HMODULE ntdll = GetModuleHandleA ("ntdll");
return ntdll != 0 && GetProcAddress (ntdll, "wine_get_version") != nullptr;
}
//==============================================================================


+ 1
- 1
modules/juce_core/threads/juce_ThreadLocalValue.h View File

@@ -27,7 +27,7 @@
#define __JUCE_THREADLOCALVALUE_JUCEHEADER__
// (NB: on win32, native thread-locals aren't possible in a dynamically loaded DLL in XP).
#if ! ((JUCE_MSVC && (defined (_WIN64) || ! defined (JucePlugin_PluginCode))) \
#if ! ((JUCE_MSVC && (JUCE_64BIT || ! defined (JucePlugin_PluginCode))) \
|| (JUCE_MAC && JUCE_CLANG && defined (MAC_OS_X_VERSION_10_7) \
&& MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7))
#define JUCE_NO_COMPILER_THREAD_LOCAL 1


Loading…
Cancel
Save