mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Updated win32 GetSystemInfo calls. URL domain name fix.
This commit is contained in:
parent
a25bddb7ff
commit
b888a72db9
3 changed files with 5 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue