1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-28 02:30:05 +00:00

Mac keyboard fix and camera tweak.

This commit is contained in:
Julian Storer 2010-02-23 19:01:36 +00:00
parent 1fc2a55d82
commit 8d05a9f2fa
5 changed files with 147 additions and 72 deletions

View file

@ -210,19 +210,24 @@ public:
}
}
imageSwapLock.enter();
const int lineStride = width * 3;
const Image::BitmapData destData (*loadingImage, 0, 0, width, height, true);
{
const int lineStride = width * 3;
const ScopedLock sl (imageSwapLock);
for (int i = 0; i < height; ++i)
memcpy (destData.getLinePointer ((height - 1) - i),
buffer + lineStride * i,
lineStride);
{
const Image::BitmapData destData (*loadingImage, 0, 0, width, height, true);
imageNeedsFlipping = true;
imageSwapLock.exit();
for (int i = 0; i < height; ++i)
memcpy (destData.getLinePointer ((height - 1) - i),
buffer + lineStride * i,
lineStride);
}
callListeners (*loadingImage);
imageNeedsFlipping = true;
}
if (listeners.size() > 0)
callListeners (*loadingImage);
sendChangeMessage (this);
}
@ -231,10 +236,9 @@ public:
{
if (imageNeedsFlipping)
{
imageSwapLock.enter();
const ScopedLock sl (imageSwapLock);
swapVariables (loadingImage, activeImage);
imageNeedsFlipping = false;
imageSwapLock.exit();
}
RectanglePlacement rp (RectanglePlacement::centred);
@ -267,7 +271,7 @@ public:
if (SUCCEEDED (hr))
{
fileWriter.CoCreateInstance (CLSID_FileWriter, CLSCTX_INPROC_SERVER);
hr = fileWriter.CoCreateInstance (CLSID_FileWriter, CLSCTX_INPROC_SERVER);
if (SUCCEEDED (hr))
{
@ -378,6 +382,7 @@ public:
}
}
//==============================================================================
class DShowCaptureViewerComp : public Component,
public ChangeListener