Browse Source

Fixed compiler warnings on Visual Studio 2015 RTM.

tags/2021-05-28
Timur Doumler 10 years ago
parent
commit
dca4d77f9d
37 changed files with 132 additions and 124 deletions
  1. +5
    -5
      examples/audio plugin demo/Source/PluginProcessor.cpp
  2. +6
    -1
      extras/Introjucer/Source/Project/jucer_ProjectType.cpp
  3. +3
    -3
      modules/juce_audio_devices/native/juce_win32_DirectSound.cpp
  4. +8
    -8
      modules/juce_audio_devices/native/juce_win32_Midi.cpp
  5. +20
    -20
      modules/juce_audio_devices/native/juce_win32_WASAPI.cpp
  6. +1
    -1
      modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp
  7. +4
    -0
      modules/juce_audio_formats/codecs/oggvorbis/bitwise.c
  8. +4
    -0
      modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c
  9. +4
    -0
      modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/sharedbook.c
  10. +4
    -0
      modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c
  11. +3
    -3
      modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp
  12. +2
    -2
      modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h
  13. +3
    -0
      modules/juce_core/juce_core.cpp
  14. +1
    -2
      modules/juce_core/native/juce_BasicNativeHeaders.h
  15. +2
    -2
      modules/juce_core/native/juce_win32_Files.cpp
  16. +5
    -5
      modules/juce_core/native/juce_win32_Network.cpp
  17. +1
    -1
      modules/juce_core/native/juce_win32_Threads.cpp
  18. +5
    -20
      modules/juce_core/time/juce_Time.cpp
  19. +4
    -4
      modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp
  20. +1
    -1
      modules/juce_events/broadcasters/juce_ChangeBroadcaster.h
  21. +1
    -1
      modules/juce_events/native/juce_win32_HiddenMessageWindow.h
  22. +3
    -3
      modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp
  23. +8
    -8
      modules/juce_graphics/native/juce_win32_Fonts.cpp
  24. +3
    -3
      modules/juce_gui_basics/drawables/juce_DrawablePath.cpp
  25. +2
    -2
      modules/juce_gui_basics/drawables/juce_DrawablePath.h
  26. +1
    -1
      modules/juce_gui_basics/filebrowser/juce_FileListComponent.h
  27. +4
    -4
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp
  28. +2
    -2
      modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h
  29. +1
    -1
      modules/juce_gui_basics/widgets/juce_TableListBox.h
  30. +1
    -1
      modules/juce_gui_basics/windows/juce_CallOutBox.h
  31. +1
    -1
      modules/juce_gui_basics/windows/juce_ResizableWindow.h
  32. +2
    -2
      modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h
  33. +2
    -2
      modules/juce_gui_extra/code_editor/juce_CodeDocument.h
  34. +8
    -8
      modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp
  35. +4
    -4
      modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp
  36. +2
    -2
      modules/juce_opengl/opengl/juce_OpenGLContext.cpp
  37. +1
    -1
      modules/juce_opengl/opengl/juce_OpenGLContext.h

+ 5
- 5
examples/audio plugin demo/Source/PluginProcessor.cpp View File

@@ -158,7 +158,7 @@ public:
return defaultValue; return defaultValue;
} }
String getName (int maximumStringLength) const override
String getName (int /* maximumStringLength */) const override
{ {
return name; return name;
} }
@@ -207,11 +207,11 @@ JuceDemoPluginAudioProcessor::~JuceDemoPluginAudioProcessor()
} }
//============================================================================== //==============================================================================
void JuceDemoPluginAudioProcessor::prepareToPlay (double sampleRate, int /*samplesPerBlock*/)
void JuceDemoPluginAudioProcessor::prepareToPlay (double newSampleRate, int /*samplesPerBlock*/)
{ {
// Use this method as the place to do any pre-playback // Use this method as the place to do any pre-playback
// initialisation that you need.. // initialisation that you need..
synth.setCurrentPlaybackSampleRate (sampleRate);
synth.setCurrentPlaybackSampleRate (newSampleRate);
keyboardState.reset(); keyboardState.reset();
delayBuffer.clear(); delayBuffer.clear();
} }
@@ -328,8 +328,8 @@ void JuceDemoPluginAudioProcessor::setStateInformation (const void* data, int si
lastUIWidth = xmlState->getIntAttribute ("uiWidth", lastUIWidth); lastUIWidth = xmlState->getIntAttribute ("uiWidth", lastUIWidth);
lastUIHeight = xmlState->getIntAttribute ("uiHeight", lastUIHeight); lastUIHeight = xmlState->getIntAttribute ("uiHeight", lastUIHeight);
gain->setValue (xmlState->getDoubleAttribute ("gain", gain->getValue()));
delay->setValue (xmlState->getDoubleAttribute ("delay", delay->getValue()));
gain->setValue ((float) xmlState->getDoubleAttribute ("gain", gain->getValue()));
delay->setValue ((float) xmlState->getDoubleAttribute ("delay", delay->getValue()));
} }
} }
} }


+ 6
- 1
extras/Introjucer/Source/Project/jucer_ProjectType.cpp View File

@@ -87,6 +87,7 @@ public:
exporter.msvcIsWindowsSubsystem = true; exporter.msvcIsWindowsSubsystem = true;
exporter.msvcTargetSuffix = ".exe"; exporter.msvcTargetSuffix = ".exe";
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
} }
}; };
@@ -118,6 +119,7 @@ public:
exporter.msvcIsWindowsSubsystem = false; exporter.msvcIsWindowsSubsystem = false;
exporter.msvcTargetSuffix = ".exe"; exporter.msvcTargetSuffix = ".exe";
exporter.msvcExtraPreprocessorDefs.set ("_CONSOLE", ""); exporter.msvcExtraPreprocessorDefs.set ("_CONSOLE", "");
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
} }
}; };
@@ -147,6 +149,7 @@ public:
exporter.makefileTargetSuffix = ".a"; exporter.makefileTargetSuffix = ".a";
exporter.msvcTargetSuffix = ".lib"; exporter.msvcTargetSuffix = ".lib";
exporter.msvcExtraPreprocessorDefs.set ("_LIB", ""); exporter.msvcExtraPreprocessorDefs.set ("_LIB", "");
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
} }
}; };
@@ -177,6 +180,7 @@ public:
exporter.makefileTargetSuffix = ".so"; exporter.makefileTargetSuffix = ".so";
exporter.msvcTargetSuffix = ".dll"; exporter.msvcTargetSuffix = ".dll";
exporter.msvcExtraPreprocessorDefs.set ("_LIB", ""); exporter.msvcExtraPreprocessorDefs.set ("_LIB", "");
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
} }
}; };
@@ -304,7 +308,7 @@ public:
exporter.msvcTargetSuffix = ".dll"; exporter.msvcTargetSuffix = ".dll";
exporter.msvcIsDLL = true; exporter.msvcIsDLL = true;
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
exporter.makefileIsDLL = true; exporter.makefileIsDLL = true;
} }
@@ -355,6 +359,7 @@ public:
exporter.msvcTargetSuffix = ".dll"; exporter.msvcTargetSuffix = ".dll";
exporter.msvcIsDLL = true; exporter.msvcIsDLL = true;
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
exporter.makefileIsDLL = true; exporter.makefileIsDLL = true;
} }


+ 3
- 3
modules/juce_audio_devices/native/juce_win32_DirectSound.cpp View File

@@ -640,7 +640,7 @@ public:
DWORD dwsize1 = 0; DWORD dwsize1 = 0;
DWORD dwsize2 = 0; DWORD dwsize2 = 0;
HRESULT hr = pInputBuffer->Lock ((DWORD) readOffset, (DWORD) bytesPerBuffer,
hr = pInputBuffer->Lock ((DWORD) readOffset, (DWORD) bytesPerBuffer,
(void**) &buf1, &dwsize1, (void**) &buf1, &dwsize1,
(void**) &buf2, &dwsize2, 0); (void**) &buf2, &dwsize2, 0);
@@ -753,9 +753,9 @@ public:
String open (const BigInteger& inputChannels, String open (const BigInteger& inputChannels,
const BigInteger& outputChannels, const BigInteger& outputChannels,
double sampleRate, int bufferSizeSamples) override
double newSampleRate, int newBufferSize) override
{ {
lastError = openDevice (inputChannels, outputChannels, sampleRate, bufferSizeSamples);
lastError = openDevice (inputChannels, outputChannels, newSampleRate, newBufferSize);
isOpen_ = lastError.isEmpty(); isOpen_ = lastError.isEmpty();
return lastError; return lastError;


+ 8
- 8
modules/juce_audio_devices/native/juce_win32_Midi.cpp View File

@@ -143,37 +143,37 @@ private:
public: public:
MidiHeader() {} MidiHeader() {}
void prepare (HMIDIIN deviceHandle)
void prepare (HMIDIIN device)
{ {
zerostruct (hdr); zerostruct (hdr);
hdr.lpData = data; hdr.lpData = data;
hdr.dwBufferLength = (DWORD) numElementsInArray (data); hdr.dwBufferLength = (DWORD) numElementsInArray (data);
midiInPrepareHeader (deviceHandle, &hdr, sizeof (hdr));
midiInPrepareHeader (device, &hdr, sizeof (hdr));
} }
void unprepare (HMIDIIN deviceHandle)
void unprepare (HMIDIIN device)
{ {
if ((hdr.dwFlags & WHDR_DONE) != 0) if ((hdr.dwFlags & WHDR_DONE) != 0)
{ {
int c = 10; int c = 10;
while (--c >= 0 && midiInUnprepareHeader (deviceHandle, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING)
while (--c >= 0 && midiInUnprepareHeader (device, &hdr, sizeof (hdr)) == MIDIERR_STILLPLAYING)
Thread::sleep (20); Thread::sleep (20);
jassert (c >= 0); jassert (c >= 0);
} }
} }
void write (HMIDIIN deviceHandle)
void write (HMIDIIN device)
{ {
hdr.dwBytesRecorded = 0; hdr.dwBytesRecorded = 0;
midiInAddBuffer (deviceHandle, &hdr, sizeof (hdr));
midiInAddBuffer (device, &hdr, sizeof (hdr));
} }
void writeIfFinished (HMIDIIN deviceHandle)
void writeIfFinished (HMIDIIN device)
{ {
if ((hdr.dwFlags & WHDR_DONE) != 0) if ((hdr.dwFlags & WHDR_DONE) != 0)
write (deviceHandle);
write (device);
} }
private: private:


+ 20
- 20
modules/juce_audio_devices/native/juce_win32_WASAPI.cpp View File

@@ -547,13 +547,13 @@ private:
//============================================================================== //==============================================================================
ComSmartPtr<IAudioClient> createClient() ComSmartPtr<IAudioClient> createClient()
{ {
ComSmartPtr<IAudioClient> client;
ComSmartPtr<IAudioClient> newClient;
if (device != nullptr) if (device != nullptr)
logFailure (device->Activate (__uuidof (IAudioClient), CLSCTX_INPROC_SERVER, logFailure (device->Activate (__uuidof (IAudioClient), CLSCTX_INPROC_SERVER,
nullptr, (void**) client.resetAndGetPointerAddress()));
nullptr, (void**) newClient.resetAndGetPointerAddress()));
return client;
return newClient;
} }
struct AudioSampleFormat struct AudioSampleFormat
@@ -563,8 +563,8 @@ private:
int bytesPerSampleContainer; int bytesPerSampleContainer;
}; };
bool tryFormat (const AudioSampleFormat sampleFormat, IAudioClient* clientToUse, double sampleRate,
DWORD mixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const
bool tryFormat (const AudioSampleFormat sampleFormat, IAudioClient* clientToUse, double newSampleRate,
DWORD newMixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const
{ {
zerostruct (format); zerostruct (format);
@@ -578,14 +578,14 @@ private:
format.Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE) - sizeof (WAVEFORMATEX); format.Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE) - sizeof (WAVEFORMATEX);
} }
format.Format.nSamplesPerSec = (DWORD) sampleRate;
format.Format.nSamplesPerSec = (DWORD) newSampleRate;
format.Format.nChannels = (WORD) numChannels; format.Format.nChannels = (WORD) numChannels;
format.Format.wBitsPerSample = (WORD) (8 * sampleFormat.bytesPerSampleContainer); format.Format.wBitsPerSample = (WORD) (8 * sampleFormat.bytesPerSampleContainer);
format.Samples.wValidBitsPerSample = (WORD) (sampleFormat.bitsPerSampleToTry); format.Samples.wValidBitsPerSample = (WORD) (sampleFormat.bitsPerSampleToTry);
format.Format.nBlockAlign = (WORD) (format.Format.nChannels * format.Format.wBitsPerSample / 8); format.Format.nBlockAlign = (WORD) (format.Format.nChannels * format.Format.wBitsPerSample / 8);
format.Format.nAvgBytesPerSec = (DWORD) (format.Format.nSamplesPerSec * format.Format.nBlockAlign); format.Format.nAvgBytesPerSec = (DWORD) (format.Format.nSamplesPerSec * format.Format.nBlockAlign);
format.SubFormat = sampleFormat.useFloat ? KSDATAFORMAT_SUBTYPE_IEEE_FLOAT : KSDATAFORMAT_SUBTYPE_PCM; format.SubFormat = sampleFormat.useFloat ? KSDATAFORMAT_SUBTYPE_IEEE_FLOAT : KSDATAFORMAT_SUBTYPE_PCM;
format.dwChannelMask = mixFormatChannelMask;
format.dwChannelMask = newMixFormatChannelMask;
WAVEFORMATEXTENSIBLE* nearestFormat = nullptr; WAVEFORMATEXTENSIBLE* nearestFormat = nullptr;
@@ -605,8 +605,8 @@ private:
return check (hr); return check (hr);
} }
bool findSupportedFormat (IAudioClient* clientToUse, double sampleRate,
DWORD mixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const
bool findSupportedFormat (IAudioClient* clientToUse, double newSampleRate,
DWORD newMixFormatChannelMask, WAVEFORMATEXTENSIBLE& format) const
{ {
static const AudioSampleFormat formats[] = static const AudioSampleFormat formats[] =
{ {
@@ -620,7 +620,7 @@ private:
}; };
for (int i = 0; i < numElementsInArray (formats); ++i) for (int i = 0; i < numElementsInArray (formats); ++i)
if (tryFormat (formats[i], clientToUse, sampleRate, mixFormatChannelMask, format))
if (tryFormat (formats[i], clientToUse, newSampleRate, newMixFormatChannelMask, format))
return true; return true;
return false; return false;
@@ -1523,10 +1523,10 @@ private:
} }
//============================================================================== //==============================================================================
void scan (StringArray& outputDeviceNames,
StringArray& inputDeviceNames,
StringArray& outputDeviceIds,
StringArray& inputDeviceIds)
void scan (StringArray& outDeviceNames,
StringArray& inDeviceNames,
StringArray& outDeviceIds,
StringArray& inDeviceIds)
{ {
if (enumerator == nullptr) if (enumerator == nullptr)
{ {
@@ -1582,19 +1582,19 @@ private:
if (flow == eRender) if (flow == eRender)
{ {
const int index = (deviceId == defaultRenderer) ? 0 : -1; const int index = (deviceId == defaultRenderer) ? 0 : -1;
outputDeviceIds.insert (index, deviceId);
outputDeviceNames.insert (index, name);
outDeviceIds.insert (index, deviceId);
outDeviceNames.insert (index, name);
} }
else if (flow == eCapture) else if (flow == eCapture)
{ {
const int index = (deviceId == defaultCapture) ? 0 : -1; const int index = (deviceId == defaultCapture) ? 0 : -1;
inputDeviceIds.insert (index, deviceId);
inputDeviceNames.insert (index, name);
inDeviceIds.insert (index, deviceId);
inDeviceNames.insert (index, name);
} }
} }
inputDeviceNames.appendNumbersToDuplicates (false, false);
outputDeviceNames.appendNumbersToDuplicates (false, false);
inDeviceNames.appendNumbersToDuplicates (false, false);
outDeviceNames.appendNumbersToDuplicates (false, false);
} }
//============================================================================== //==============================================================================


+ 1
- 1
modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp View File

@@ -33,7 +33,7 @@ namespace OggVorbisNamespace
#if JUCE_INCLUDE_OGGVORBIS_CODE || ! defined (JUCE_INCLUDE_OGGVORBIS_CODE) #if JUCE_INCLUDE_OGGVORBIS_CODE || ! defined (JUCE_INCLUDE_OGGVORBIS_CODE)
#if JUCE_MSVC #if JUCE_MSVC
#pragma warning (push) #pragma warning (push)
#pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365)
#pragma warning (disable: 4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459)
#endif #endif
#if JUCE_CLANG #if JUCE_CLANG


+ 4
- 0
modules/juce_audio_formats/codecs/oggvorbis/bitwise.c View File

@@ -15,6 +15,10 @@
********************************************************************/ ********************************************************************/
#ifdef JUCE_MSVC
#pragma warning (disable: 4456 4457 4459)
#endif
/* We're 'LSb' endian; if we write a word but read individual bits, /* We're 'LSb' endian; if we write a word but read individual bits,
then we'll read the lsb first */ then we'll read the lsb first */


+ 4
- 0
modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/floor1.c View File

@@ -15,6 +15,10 @@
********************************************************************/ ********************************************************************/
#ifdef JUCE_MSVC
#pragma warning (disable: 4456 4457 4459)
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>


+ 4
- 0
modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/sharedbook.c View File

@@ -15,6 +15,10 @@
********************************************************************/ ********************************************************************/
#ifdef JUCE_MSVC
#pragma warning (disable: 4456 4457 4459)
#endif
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>


+ 4
- 0
modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c View File

@@ -15,6 +15,10 @@
********************************************************************/ ********************************************************************/
#ifdef JUCE_MSVC
#pragma warning (disable: 4456 4457 4459)
#endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>


+ 3
- 3
modules/juce_audio_processors/processors/juce_AudioProcessorGraph.cpp View File

@@ -860,7 +860,7 @@ AudioProcessorGraph::Node::Node (const uint32 nodeID, AudioProcessor* const p) n
jassert (processor != nullptr); jassert (processor != nullptr);
} }
void AudioProcessorGraph::Node::prepare (const double sampleRate, const int blockSize,
void AudioProcessorGraph::Node::prepare (const double newSampleRate, const int newBlockSize,
AudioProcessorGraph* const graph) AudioProcessorGraph* const graph)
{ {
if (! isPrepared) if (! isPrepared)
@@ -870,9 +870,9 @@ void AudioProcessorGraph::Node::prepare (const double sampleRate, const int bloc
processor->setPlayConfigDetails (processor->getNumInputChannels(), processor->setPlayConfigDetails (processor->getNumInputChannels(),
processor->getNumOutputChannels(), processor->getNumOutputChannels(),
sampleRate, blockSize);
newSampleRate, newBlockSize);
processor->prepareToPlay (sampleRate, blockSize);
processor->prepareToPlay (newSampleRate, newBlockSize);
} }
} }


+ 2
- 2
modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h View File

@@ -92,7 +92,7 @@ public:
Node (uint32 nodeId, AudioProcessor*) noexcept; Node (uint32 nodeId, AudioProcessor*) noexcept;
void setParentGraph (AudioProcessorGraph*) const; void setParentGraph (AudioProcessorGraph*) const;
void prepare (double sampleRate, int blockSize, AudioProcessorGraph*);
void prepare (double newSampleRate, int newBlockSize, AudioProcessorGraph*);
void unprepare(); void unprepare();
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Node) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Node)
@@ -306,7 +306,7 @@ public:
const String getName() const override; const String getName() const override;
void fillInPluginDescription (PluginDescription&) const override; void fillInPluginDescription (PluginDescription&) const override;
void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock) override;
void prepareToPlay (double newSampleRate, int estimatedSamplesPerBlock) override;
void releaseResources() override; void releaseResources() override;
void processBlock (AudioSampleBuffer&, MidiBuffer&) override; void processBlock (AudioSampleBuffer&, MidiBuffer&) override;


+ 3
- 0
modules/juce_core/juce_core.cpp View File

@@ -59,7 +59,10 @@
#include <ws2tcpip.h> #include <ws2tcpip.h>
#if ! JUCE_MINGW #if ! JUCE_MINGW
#pragma warning (push)
#pragma warning (disable: 4091)
#include <Dbghelp.h> #include <Dbghelp.h>
#pragma warning (pop)
#if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES #if ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment (lib, "DbgHelp.lib") #pragma comment (lib, "DbgHelp.lib")


+ 1
- 2
modules/juce_core/native/juce_BasicNativeHeaders.h View File

@@ -80,8 +80,7 @@
#error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!" #error "You're compiling without exceptions enabled! This is needed for a lot of JUCE classes, please update your compiler settings!"
#endif #endif
#pragma warning (push)
#pragma warning (disable : 4100 4201 4514 4312 4995)
#pragma warning (push, 0) // disable all warnings whilst including system headers
#endif #endif
#define STRICT 1 #define STRICT 1


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

@@ -292,12 +292,12 @@ void FileOutputStream::closeHandle()
CloseHandle ((HANDLE) fileHandle); CloseHandle ((HANDLE) fileHandle);
} }
ssize_t FileOutputStream::writeInternal (const void* buffer, size_t numBytes)
ssize_t FileOutputStream::writeInternal (const void* bufferToWrite, size_t numBytes)
{ {
if (fileHandle != nullptr) if (fileHandle != nullptr)
{ {
DWORD actualNum = 0; DWORD actualNum = 0;
if (! WriteFile ((HANDLE) fileHandle, buffer, (DWORD) numBytes, &actualNum, 0))
if (! WriteFile ((HANDLE) fileHandle, bufferToWrite, (DWORD) numBytes, &actualNum, 0))
status = WindowsFileHelpers::getResultForLastError(); status = WindowsFileHelpers::getResultForLastError();
return (ssize_t) actualNum; return (ssize_t) actualNum;


+ 5
- 5
modules/juce_core/native/juce_win32_Network.cpp View File

@@ -52,7 +52,7 @@ public:
if (! isError()) if (! isError())
{ {
DWORD bufferSizeBytes = 4096; DWORD bufferSizeBytes = 4096;
StringPairArray headers (false);
StringPairArray dataHeaders (false);
for (;;) for (;;)
{ {
@@ -68,8 +68,8 @@ public:
const String& header = headersArray[i]; const String& header = headersArray[i];
const String key (header.upToFirstOccurrenceOf (": ", false, false)); const String key (header.upToFirstOccurrenceOf (": ", false, false));
const String value (header.fromFirstOccurrenceOf (": ", false, false)); const String value (header.fromFirstOccurrenceOf (": ", false, false));
const String previousValue (headers[key]);
headers.set (key, previousValue.isEmpty() ? value : (previousValue + "," + value));
const String previousValue (dataHeaders[key]);
dataHeaders.set (key, previousValue.isEmpty() ? value : (previousValue + "," + value));
} }
break; break;
@@ -91,7 +91,7 @@ public:
if (numRedirectsToFollow >= 0 if (numRedirectsToFollow >= 0
&& (statusCode == 301 || statusCode == 302 || statusCode == 303 || statusCode == 307)) && (statusCode == 301 || statusCode == 302 || statusCode == 303 || statusCode == 307))
{ {
String newLocation (headers["Location"]);
String newLocation (dataHeaders["Location"]);
// Check whether location is a relative URI - this is an incomplete test for relative path, // Check whether location is a relative URI - this is an incomplete test for relative path,
// but we'll use it for now (valid protocols for this implementation are http, https & ftp) // but we'll use it for now (valid protocols for this implementation are http, https & ftp)
@@ -114,7 +114,7 @@ public:
} }
if (responseHeaders != nullptr) if (responseHeaders != nullptr)
responseHeaders->addArray (headers);
responseHeaders->addArray (dataHeaders);
} }
break; break;


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

@@ -110,7 +110,7 @@ void Thread::launchThread()
{ {
unsigned int newThreadId; unsigned int newThreadId;
threadHandle = (void*) _beginthreadex (0, 0, &threadEntryProc, this, 0, &newThreadId); threadHandle = (void*) _beginthreadex (0, 0, &threadEntryProc, this, 0, &newThreadId);
threadId = (ThreadID) newThreadId;
threadId = (ThreadID) (pointer_sized_int) newThreadId;
} }
void Thread::closeThreadHandle() void Thread::closeThreadHandle()


+ 5
- 20
modules/juce_core/time/juce_Time.cpp View File

@@ -64,19 +64,14 @@ namespace TimeHelpers
{ {
time_t now = static_cast <time_t> (seconds); time_t now = static_cast <time_t> (seconds);
#if JUCE_WINDOWS
#ifdef _INC_TIME_INL
#if JUCE_WINDOWS
if (now >= 0 && now <= 0x793406fff) if (now >= 0 && now <= 0x793406fff)
localtime_s (&result, &now); localtime_s (&result, &now);
else else
zerostruct (result); zerostruct (result);
#else #else
result = *localtime (&now);
#endif
#else
localtime_r (&now, &result); // more thread-safe localtime_r (&now, &result); // more thread-safe
#endif
#endif
} }
return result; return result;
@@ -195,19 +190,15 @@ Time& Time::operator= (const Time& other) noexcept
//============================================================================== //==============================================================================
int64 Time::currentTimeMillis() noexcept int64 Time::currentTimeMillis() noexcept
{ {
#if JUCE_WINDOWS
#if JUCE_WINDOWS
struct _timeb t; struct _timeb t;
#ifdef _INC_TIME_INL
_ftime_s (&t); _ftime_s (&t);
#else
_ftime (&t);
#endif
return ((int64) t.time) * 1000 + t.millitm; return ((int64) t.time) * 1000 + t.millitm;
#else
#else
struct timeval tv; struct timeval tv;
gettimeofday (&tv, nullptr); gettimeofday (&tv, nullptr);
return ((int64) tv.tv_sec) * 1000 + tv.tv_usec / 1000; return ((int64) tv.tv_sec) * 1000 + tv.tv_usec / 1000;
#endif
#endif
} }
Time JUCE_CALLTYPE Time::getCurrentTime() noexcept Time JUCE_CALLTYPE Time::getCurrentTime() noexcept
@@ -364,7 +355,6 @@ String Time::getTimeZone() const noexcept
#if JUCE_MSVC #if JUCE_MSVC
_tzset(); _tzset();
#ifdef _INC_TIME_INL
for (int i = 0; i < 2; ++i) for (int i = 0; i < 2; ++i)
{ {
char name[128] = { 0 }; char name[128] = { 0 };
@@ -372,11 +362,6 @@ String Time::getTimeZone() const noexcept
_get_tzname (&length, name, 127, i); _get_tzname (&length, name, 127, i);
zone[i] = name; zone[i] = name;
} }
#else
const char** const zonePtr = (const char**) _tzname;
zone[0] = zonePtr[0];
zone[1] = zonePtr[1];
#endif
#else #else
#if JUCE_MINGW #if JUCE_MINGW
#warning "Can't find a replacement for tzset on mingw - ideas welcome!" #warning "Can't find a replacement for tzset on mingw - ideas welcome!"


+ 4
- 4
modules/juce_events/broadcasters/juce_ChangeBroadcaster.cpp View File

@@ -24,7 +24,7 @@
ChangeBroadcaster::ChangeBroadcaster() noexcept ChangeBroadcaster::ChangeBroadcaster() noexcept
{ {
callback.owner = this;
broadcastCallback.owner = this;
} }
ChangeBroadcaster::~ChangeBroadcaster() ChangeBroadcaster::~ChangeBroadcaster()
@@ -61,7 +61,7 @@ void ChangeBroadcaster::removeAllChangeListeners()
void ChangeBroadcaster::sendChangeMessage() void ChangeBroadcaster::sendChangeMessage()
{ {
if (changeListeners.size() > 0) if (changeListeners.size() > 0)
callback.triggerAsyncUpdate();
broadcastCallback.triggerAsyncUpdate();
} }
void ChangeBroadcaster::sendSynchronousChangeMessage() void ChangeBroadcaster::sendSynchronousChangeMessage()
@@ -69,13 +69,13 @@ void ChangeBroadcaster::sendSynchronousChangeMessage()
// This can only be called by the event thread. // This can only be called by the event thread.
jassert (MessageManager::getInstance()->isThisTheMessageThread()); jassert (MessageManager::getInstance()->isThisTheMessageThread());
callback.cancelPendingUpdate();
broadcastCallback.cancelPendingUpdate();
callListeners(); callListeners();
} }
void ChangeBroadcaster::dispatchPendingMessages() void ChangeBroadcaster::dispatchPendingMessages()
{ {
callback.handleUpdateNowIfNeeded();
broadcastCallback.handleUpdateNowIfNeeded();
} }
void ChangeBroadcaster::callListeners() void ChangeBroadcaster::callListeners()


+ 1
- 1
modules/juce_events/broadcasters/juce_ChangeBroadcaster.h View File

@@ -93,7 +93,7 @@ private:
}; };
friend class ChangeBroadcasterCallback; friend class ChangeBroadcasterCallback;
ChangeBroadcasterCallback callback;
ChangeBroadcasterCallback broadcastCallback;
ListenerList <ChangeListener> changeListeners; ListenerList <ChangeListener> changeListeners;
void callListeners(); void callListeners();


+ 1
- 1
modules/juce_events/native/juce_win32_HiddenMessageWindow.h View File

@@ -63,7 +63,7 @@ private:
ATOM atom; ATOM atom;
HWND hwnd; HWND hwnd;
LPCTSTR getClassNameFromAtom() noexcept { return (LPCTSTR) MAKELONG (atom, 0); }
LPCTSTR getClassNameFromAtom() noexcept { return (LPCTSTR) atom; }
}; };
//============================================================================== //==============================================================================


+ 3
- 3
modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp View File

@@ -75,10 +75,10 @@ namespace DirectWriteTypeLayout
if (currentLine >= layout->getNumLines()) if (currentLine >= layout->getNumLines())
{ {
jassert (currentLine == layout->getNumLines()); jassert (currentLine == layout->getNumLines());
TextLayout::Line* const newLine = new TextLayout::Line();
layout->addLine (newLine);
TextLayout::Line* const line = new TextLayout::Line();
layout->addLine (line);
newLine->lineOrigin = Point<float> (baselineOriginX, baselineOriginY);
line->lineOrigin = Point<float> (baselineOriginX, baselineOriginY);
} }
} }


+ 8
- 8
modules/juce_graphics/native/juce_win32_Fonts.cpp View File

@@ -542,22 +542,22 @@ private:
} }
} }
void createKerningPairs (HDC dc, const float height)
void createKerningPairs (HDC hdc, const float height)
{ {
HeapBlock<KERNINGPAIR> rawKerning; HeapBlock<KERNINGPAIR> rawKerning;
const DWORD numKPs = GetKerningPairs (dc, 0, 0);
const DWORD numKPs = GetKerningPairs (hdc, 0, 0);
rawKerning.calloc (numKPs); rawKerning.calloc (numKPs);
GetKerningPairs (dc, numKPs, rawKerning);
GetKerningPairs (hdc, numKPs, rawKerning);
kerningPairs.ensureStorageAllocated ((int) numKPs); kerningPairs.ensureStorageAllocated ((int) numKPs);
for (DWORD i = 0; i < numKPs; ++i) for (DWORD i = 0; i < numKPs; ++i)
{ {
KerningPair kp; KerningPair kp;
kp.glyph1 = getGlyphForChar (dc, rawKerning[i].wFirst);
kp.glyph2 = getGlyphForChar (dc, rawKerning[i].wSecond);
kp.glyph1 = getGlyphForChar (hdc, rawKerning[i].wFirst);
kp.glyph2 = getGlyphForChar (hdc, rawKerning[i].wSecond);
const int standardWidth = getGlyphWidth (dc, kp.glyph1);
const int standardWidth = getGlyphWidth (hdc, kp.glyph1);
kp.kerning = (standardWidth + rawKerning[i].iKernAmount) / height; kp.kerning = (standardWidth + rawKerning[i].iKernAmount) / height;
kerningPairs.add (kp); kerningPairs.add (kp);
@@ -587,7 +587,7 @@ private:
return gm.gmCellIncX; return gm.gmCellIncX;
} }
float getKerning (HDC dc, const int glyph1, const int glyph2)
float getKerning (HDC hdc, const int glyph1, const int glyph2)
{ {
KerningPair kp; KerningPair kp;
kp.glyph1 = glyph1; kp.glyph1 = glyph1;
@@ -602,7 +602,7 @@ private:
if (index < 0) if (index < 0)
{ {
kp.glyph2 = -1; kp.glyph2 = -1;
kp.kerning = getGlyphWidth (dc, kp.glyph1) / (float) tm.tmHeight;
kp.kerning = getGlyphWidth (hdc, kp.glyph1) / (float) tm.tmHeight;
kerningPairs.add (kp); kerningPairs.add (kp);
return kp.kerning; return kp.kerning;
} }


+ 3
- 3
modules/juce_gui_basics/drawables/juce_DrawablePath.cpp View File

@@ -88,11 +88,11 @@ public:
bool ok = true; bool ok = true;
jassert (owner.relativePath != nullptr); jassert (owner.relativePath != nullptr);
const RelativePointPath& path = *owner.relativePath;
const RelativePointPath& relPath = *owner.relativePath;
for (int i = 0; i < path.elements.size(); ++i)
for (int i = 0; i < relPath.elements.size(); ++i)
{ {
RelativePointPath::ElementBase* const e = path.elements.getUnchecked(i);
RelativePointPath::ElementBase* const e = relPath.elements.getUnchecked(i);
int numPoints; int numPoints;
RelativePoint* const points = e->getControlPoints (numPoints); RelativePoint* const points = e->getControlPoints (numPoints);


+ 2
- 2
modules/juce_gui_basics/drawables/juce_DrawablePath.h View File

@@ -123,8 +123,8 @@ public:
ValueTree getPathState(); ValueTree getPathState();
void readFrom (const RelativePointPath& path, UndoManager* undoManager);
void writeTo (RelativePointPath& path) const;
void readFrom (const RelativePointPath& relativePath, UndoManager* undoManager);
void writeTo (RelativePointPath& relativePath) const;
static const Identifier nonZeroWinding, point1, point2, point3; static const Identifier nonZeroWinding, point1, point2, point3;
}; };


+ 1
- 1
modules/juce_gui_basics/filebrowser/juce_FileListComponent.h View File

@@ -85,7 +85,7 @@ private:
int getNumRows() override; int getNumRows() override;
void paintListBoxItem (int, Graphics&, int, int, bool) override; void paintListBoxItem (int, Graphics&, int, int, bool) override;
Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component*) override; Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component*) override;
void selectedRowsChanged (int lastRowSelected) override;
void selectedRowsChanged (int row) override;
void deleteKeyPressed (int currentSelectedRow) override; void deleteKeyPressed (int currentSelectedRow) override;
void returnKeyPressed (int currentSelectedRow) override; void returnKeyPressed (int currentSelectedRow) override;


+ 4
- 4
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -1224,7 +1224,7 @@ private:
clearSingletonInstance(); clearSingletonInstance();
} }
LPCTSTR getWindowClassName() const noexcept { return (LPCTSTR) MAKELONG (atom, 0); }
LPCTSTR getWindowClassName() const noexcept { return (LPCTSTR) atom; }
juce_DeclareSingleton_SingleThreaded_Minimal (WindowClassHolder) juce_DeclareSingleton_SingleThreaded_Minimal (WindowClassHolder)
@@ -3280,13 +3280,13 @@ String SystemClipboard::getTextFromClipboard()
} }
//============================================================================== //==============================================================================
void Desktop::setKioskComponent (Component* kioskModeComponent, bool enableOrDisable, bool /*allowMenusAndBars*/)
void Desktop::setKioskComponent (Component* kioskModeComp, bool enableOrDisable, bool /*allowMenusAndBars*/)
{ {
if (TopLevelWindow* tlw = dynamic_cast<TopLevelWindow*> (kioskModeComponent))
if (TopLevelWindow* tlw = dynamic_cast<TopLevelWindow*> (kioskModeComp))
tlw->setUsingNativeTitleBar (! enableOrDisable); tlw->setUsingNativeTitleBar (! enableOrDisable);
if (enableOrDisable) if (enableOrDisable)
kioskModeComponent->setBounds (getDisplays().getMainDisplay().totalArea);
kioskModeComp->setBounds (getDisplays().getMainDisplay().totalArea);
} }
//============================================================================== //==============================================================================


+ 2
- 2
modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h View File

@@ -40,8 +40,8 @@ public:
void componentMovedOrResized (Component&, bool, bool); void componentMovedOrResized (Component&, bool, bool);
void componentParentHierarchyChanged (Component&); void componentParentHierarchyChanged (Component&);
void componentChildrenChanged (Component& component);
void componentBeingDeleted (Component& component);
void componentChildrenChanged (Component&);
void componentBeingDeleted (Component&);
void markersChanged (MarkerList*); void markersChanged (MarkerList*);
void markerListBeingDeleted (MarkerList* markerList); void markerListBeingDeleted (MarkerList* markerList);


+ 1
- 1
modules/juce_gui_basics/widgets/juce_TableListBox.h View File

@@ -309,7 +309,7 @@ public:
/** @internal */ /** @internal */
Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component* existingComponentToUpdate) override; Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component* existingComponentToUpdate) override;
/** @internal */ /** @internal */
void selectedRowsChanged (int lastRowSelected) override;
void selectedRowsChanged (int row) override;
/** @internal */ /** @internal */
void deleteKeyPressed (int currentSelectedRow) override; void deleteKeyPressed (int currentSelectedRow) override;
/** @internal */ /** @internal */


+ 1
- 1
modules/juce_gui_basics/windows/juce_CallOutBox.h View File

@@ -139,7 +139,7 @@ public:
{ {
virtual ~LookAndFeelMethods() {} virtual ~LookAndFeelMethods() {}
virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image& cachedImage) = 0;
virtual void drawCallOutBoxBackground (CallOutBox&, Graphics&, const Path&, Image&) = 0;
virtual int getCallOutBoxBorderSize (const CallOutBox&) = 0; virtual int getCallOutBoxBorderSize (const CallOutBox&) = 0;
}; };


+ 1
- 1
modules/juce_gui_basics/windows/juce_ResizableWindow.h View File

@@ -164,7 +164,7 @@ public:
with the current constrainer. with the current constrainer.
@see setConstrainer @see setConstrainer
*/ */
void setBoundsConstrained (const Rectangle<int>& bounds);
void setBoundsConstrained (const Rectangle<int>& newBounds);
//============================================================================== //==============================================================================


+ 2
- 2
modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h View File

@@ -123,7 +123,7 @@ public:
Thread::startThread() for values Thread::startThread() for values
@returns true if the thread finished normally; false if the user pressed cancel @returns true if the thread finished normally; false if the user pressed cancel
*/ */
bool runThread (int threadPriority = 5);
bool runThread (int priority = 5);
#endif #endif
/** Starts the thread and returns. /** Starts the thread and returns.
@@ -135,7 +135,7 @@ public:
@param threadPriority the priority to use when starting the thread - see @param threadPriority the priority to use when starting the thread - see
Thread::startThread() for values Thread::startThread() for values
*/ */
void launchThread (int threadPriority = 5);
void launchThread (int priority = 5);
/** The thread should call this periodically to update the position of the progress bar. /** The thread should call this periodically to update the position of the progress bar.


+ 2
- 2
modules/juce_gui_extra/code_editor/juce_CodeDocument.h View File

@@ -125,7 +125,7 @@ public:
Lines are numbered from zero, and if the line or index are beyond the bounds of the document, Lines are numbered from zero, and if the line or index are beyond the bounds of the document,
they will be adjusted to keep them within its limits. they will be adjusted to keep them within its limits.
*/ */
void setLineAndIndex (int newLine, int newIndexInLine);
void setLineAndIndex (int newLineNumber, int newIndexInLine);
/** Returns the line number of this position. /** Returns the line number of this position.
The first line in the document is numbered zero, not one! The first line in the document is numbered zero, not one!
@@ -257,7 +257,7 @@ public:
The string must be either "\n", "\r\n", or (rarely) "\r". The string must be either "\n", "\r\n", or (rarely) "\r".
@see getNewLineCharacters @see getNewLineCharacters
*/ */
void setNewLineCharacters (const String& newLine) noexcept;
void setNewLineCharacters (const String& newLineCharacters) noexcept;
//============================================================================== //==============================================================================
/** Begins a new undo transaction. /** Begins a new undo transaction.


+ 8
- 8
modules/juce_gui_extra/native/juce_win32_ActiveXComponent.cpp View File

@@ -225,10 +225,10 @@ public:
storage->Release(); storage->Release();
} }
void setControlBounds (const Rectangle<int>& bounds) const
void setControlBounds (const Rectangle<int>& newBounds) const
{ {
if (controlHWND != 0) if (controlHWND != 0)
MoveWindow (controlHWND, bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight(), TRUE);
MoveWindow (controlHWND, newBounds.getX(), newBounds.getY(), newBounds.getWidth(), newBounds.getHeight(), TRUE);
} }
void setControlVisible (bool shouldBeVisible) const void setControlVisible (bool shouldBeVisible) const
@@ -332,7 +332,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID)
if (ComponentPeer* const peer = getPeer()) if (ComponentPeer* const peer = getPeer())
{ {
const Rectangle<int> bounds (peer->getAreaCoveredBy (*this));
const Rectangle<int> controlBounds (peer->getAreaCoveredBy (*this));
HWND hwnd = (HWND) peer->getNativeHandle(); HWND hwnd = (HWND) peer->getNativeHandle();
@@ -348,10 +348,10 @@ bool ActiveXControlComponent::createControl (const void* controlIID)
if (OleSetContainedObject (newControl->control, TRUE) == S_OK) if (OleSetContainedObject (newControl->control, TRUE) == S_OK)
{ {
RECT rect; RECT rect;
rect.left = bounds.getX();
rect.top = bounds.getY();
rect.right = bounds.getRight();
rect.bottom = bounds.getBottom();
rect.left = controlBounds.getX();
rect.top = controlBounds.getY();
rect.right = controlBounds.getRight();
rect.bottom = controlBounds.getBottom();
if (newControl->control->DoVerb (OLEIVERB_SHOW, 0, newControl->clientSite, 0, hwnd, &rect) == S_OK) if (newControl->control->DoVerb (OLEIVERB_SHOW, 0, newControl->clientSite, 0, hwnd, &rect) == S_OK)
{ {
@@ -360,7 +360,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID)
if (control->controlHWND != 0) if (control->controlHWND != 0)
{ {
control->setControlBounds (bounds);
control->setControlBounds (controlBounds);
control->originalWndProc = (WNDPROC) GetWindowLongPtr ((HWND) control->controlHWND, GWLP_WNDPROC); control->originalWndProc = (WNDPROC) GetWindowLongPtr ((HWND) control->controlHWND, GWLP_WNDPROC);
SetWindowLongPtr ((HWND) control->controlHWND, GWLP_WNDPROC, (LONG_PTR) Pimpl::activeXHookWndProc); SetWindowLongPtr ((HWND) control->controlHWND, GWLP_WNDPROC, (LONG_PTR) Pimpl::activeXHookWndProc);


+ 4
- 4
modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp View File

@@ -71,8 +71,8 @@ public:
{ {
LPSAFEARRAY sa = nullptr; LPSAFEARRAY sa = nullptr;
VARIANT flags, frame, postDataVar, headersVar; // (_variant_t isn't available in all compilers)
VariantInit (&flags);
VARIANT headerFlags, frame, postDataVar, headersVar; // (_variant_t isn't available in all compilers)
VariantInit (&headerFlags);
VariantInit (&frame); VariantInit (&frame);
VariantInit (&postDataVar); VariantInit (&postDataVar);
VariantInit (&headersVar); VariantInit (&headersVar);
@@ -109,12 +109,12 @@ public:
} }
browser->Navigate ((BSTR) (const OLECHAR*) url.toWideCharPointer(), browser->Navigate ((BSTR) (const OLECHAR*) url.toWideCharPointer(),
&flags, &frame, &postDataVar, &headersVar);
&headerFlags, &frame, &postDataVar, &headersVar);
if (sa != nullptr) if (sa != nullptr)
SafeArrayDestroy (sa); SafeArrayDestroy (sa);
VariantClear (&flags);
VariantClear (&headerFlags);
VariantClear (&frame); VariantClear (&frame);
VariantClear (&postDataVar); VariantClear (&postDataVar);
VariantClear (&headersVar); VariantClear (&headersVar);


+ 2
- 2
modules/juce_opengl/opengl/juce_OpenGLContext.cpp View File

@@ -570,7 +570,7 @@ private:
{ {
Component& comp = *getComponent(); Component& comp = *getComponent();
CachedImage* const newCachedImage = new CachedImage (context, comp, CachedImage* const newCachedImage = new CachedImage (context, comp,
context.pixelFormat,
context.openGLPixelFormat,
context.contextToShareWith); context.contextToShareWith);
comp.setCachedComponentImage (newCachedImage); comp.setCachedComponentImage (newCachedImage);
newCachedImage->start(); // (must wait until this is attached before starting its thread) newCachedImage->start(); // (must wait until this is attached before starting its thread)
@@ -647,7 +647,7 @@ void OpenGLContext::setPixelFormat (const OpenGLPixelFormat& preferredPixelForma
// Call it before attaching your context, or use detach() first, before calling this! // Call it before attaching your context, or use detach() first, before calling this!
jassert (nativeContext == nullptr); jassert (nativeContext == nullptr);
pixelFormat = preferredPixelFormat;
openGLPixelFormat = preferredPixelFormat;
} }
void OpenGLContext::setNativeSharedContext (void* nativeContextToShareWith) noexcept void OpenGLContext::setNativeSharedContext (void* nativeContextToShareWith) noexcept


+ 1
- 1
modules/juce_opengl/opengl/juce_OpenGLContext.h View File

@@ -280,7 +280,7 @@ private:
OpenGLRenderer* renderer; OpenGLRenderer* renderer;
double currentRenderScale; double currentRenderScale;
ScopedPointer<Attachment> attachment; ScopedPointer<Attachment> attachment;
OpenGLPixelFormat pixelFormat;
OpenGLPixelFormat openGLPixelFormat;
void* contextToShareWith; void* contextToShareWith;
OpenGLVersion versionRequired; OpenGLVersion versionRequired;
size_t imageCacheMaxSize; size_t imageCacheMaxSize;


Loading…
Cancel
Save