Browse Source

Updated win32 GetSystemInfo calls. URL domain name fix.

tags/2021-05-28
jules 13 years ago
parent
commit
b888a72db9
3 changed files with 5 additions and 13 deletions
  1. +2
    -2
      modules/juce_core/native/juce_win32_SystemStats.cpp
  2. +3
    -3
      modules/juce_core/network/juce_URL.cpp
  3. +0
    -8
      modules/juce_video/native/juce_win32_DirectShowComponent.cpp

+ 2
- 2
modules/juce_core/native/juce_win32_SystemStats.cpp View File

@@ -114,7 +114,7 @@ SystemStats::CPUFlags::CPUFlags()
#endif
SYSTEM_INFO systemInfo;
GetSystemInfo (&systemInfo);
GetNativeSystemInfo (&systemInfo);
numCpus = (int) systemInfo.dwNumberOfProcessors;
}
@@ -344,7 +344,7 @@ bool Time::setSystemTimeToThisTime() const
int SystemStats::getPageSize()
{
SYSTEM_INFO systemInfo;
GetSystemInfo (&systemInfo);
GetNativeSystemInfo (&systemInfo);
return (int) systemInfo.dwPageSize;
}


+ 3
- 3
modules/juce_core/network/juce_URL.cpp View File

@@ -241,9 +241,9 @@ String URL::getDomain() const
const int end1 = url.indexOfChar (start, '/');
const int end2 = url.indexOfChar (start, ':');
const int end = (end1 < 0 || end2 < 0) ? jmax (end1, end2)
: jmin (end1, end2);
const int end = (end1 < 0 && end2 < 0) ? std::numeric_limits<int>::max()
: ((end1 < 0 || end2 < 0) ? jmax (end1, end2)
: jmin (end1, end2));
return url.substring (start, end);
}


+ 0
- 8
modules/juce_video/native/juce_win32_DirectShowComponent.cpp View File

@@ -226,12 +226,6 @@ public:
CoUninitialize();
}
//======================================================================
HWND getNativeWindowHandle() const
{
return nativeWindow != nullptr ? nativeWindow->getHandle() : 0;
}
//======================================================================
void updateWindowPosition (const Rectangle<int>& newBounds)
{
@@ -537,8 +531,6 @@ private:
if (c != nullptr)
{
jassert (c->getNativeWindowHandle() == hwnd);
switch (msg)
{
case WM_ERASEBKGND: return 1;


Loading…
Cancel
Save