1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

14609 commits

Author SHA1 Message Date
Anthony Nicholls
1e5c88899e JSON: Use UTF8 encoding by default 2024-09-06 15:40:39 +00:00
Anthony Nicholls
379afb1e3f JSON: Fix encoding of BEL character 2024-09-06 15:40:39 +00:00
Anthony Nicholls
0a78fefecb Text: Improve string validation
- Reject surrogate code points for all unicode encodings
- Prevent out of bounds access in some cases
- Move ASCII and UTF character validation functions to CharacterFunctions
- Add more unit tests
2024-09-06 15:40:39 +00:00
Anthony Nicholls
1dd2b3c90e Formatting: Whitespace 2024-09-06 15:40:39 +00:00
Anthony Nicholls
1b0f45fa96 Formatting: Improve consistency of static inline word ordering 2024-09-06 15:40:39 +00:00
Anthony Nicholls
18d904c6f3 VST3: Work around a bug in the SDK when detecting C++20 support 2024-09-05 20:33:13 +01:00
Anthony Nicholls
99f81c3ece VST3: Remove an out of date comment 2024-09-05 20:32:22 +01:00
Anthony Nicholls
9f8abbd72c Core: Update compile time flags for checking C++ support 2024-09-05 18:59:05 +01:00
attila
83720ac462 EdgeTable: Fix assertion caused by unnecessarily storing prepending zero levels
This partially restores the behaviour prior to commit
dda0719d56, in that we will never store a
segment if its level equals the last stored level.
2024-09-05 17:36:51 +02:00
attila
adeac2a2ea WindowsMediaAudioFormat: Handle useReaderLeftChan, and useReaderRightChan parameters correctly
Prior to this calling AudioFormatReader::read() with an AudioBuffer
with one channel would crash, even if the useReaderLeftChan and
useReaderRightChan parameters prescribed a valid operation.

Unlike other implementations, WindowsMediaAudioFormat would use the last
source channel multiple times if numDestChannels > numSourceChannels, as
opposed to zeroing out the extra destination channels.
2024-09-05 16:41:48 +02:00
attila
0d6b3f0d7d Formatting
The documentation specifies that the "Duration" property is given in
100 nanosecond units, which is a good thing, otherwise the calculation
wouldn't be correct.
2024-09-05 16:41:25 +02:00
attila
5b98066a48 Windows: WebBrowserComponent: Fix visibility of initially not visible component
Prior to this commit a WebBrowserComponent created with
setVisible (false) would still be visible.
2024-09-05 16:41:25 +02:00
reuk
e598337655 NativeMessageBox: Fix string pointer use-after-free
toWideCharPointer() returns a pointer to a buffer managed by the String.
The wchar_t pointers are not read until the invocation of
TaskDialogIndirect, so the String instances must remain alive until this
point.
2024-09-05 12:21:02 +01:00
reuk
add3a5de0d
Android: Fix issues with input stream special members
Fixes bugs in AndroidInputStreamWrapper introduced in
0d2e34f34c

- Now that AndroidInputStreamWrapper is moveable, its destructor must be
  able to handle the situation where stream is null
- The move assignment operators of AndroidInputStreamWrapper and
  AndroidContentUriInputStream could previously end up calling
  themselves recursively
2024-09-05 12:17:12 +01:00
reuk
faf6d9976a
Windows: Fix WM_NCCALCSIZE behaviour for frameless windows on multiple display systems
Previously, maximising a frameless window on a secondary display could
result in the window's coordinates being computed incorrectly, leading
to graphical glitches.
2024-09-05 12:16:39 +01:00
reuk
25e2fa44ff
Direct2D: Correctly recreate ID2D1DeviceContext when moving transparent windows between devices 2024-09-05 12:16:02 +01:00
reuk
14d52769dc
Direct2D: Revert to using grayscale text antialisaing exclusively
Reverts b12088a1f6

After some investigation, it appears that ClearType rendering is
unsuitable when
- the render target has translucent pixels underneath rendered text, or
- the render ouput is rotated, scaled, subpixel-translated, or otherwise
  transformed before display.

This necessitates avoiding ClearType when rendering into transparent
bitmaps.

Unfortunately, a commmon use-case for transparent bitmaps is buffered
component images. Even if ClearType were enabled for opaque targets,
ClearType text could then end up displaying next to non-ClearType text
rendered to an intermediate texture, leading to an inconsistent
appearance.

There's also not a straightforward way of exposing a ClearType rendering
option in all of the places that it would be required, and a change of
this size is difficult to justify given that subpixel text rendering
controls would only have an effect on Windows.
2024-09-05 12:15:31 +01:00
reuk
735f99418c
OpenGL: Ensure window repainting messages are emitted correctly on Windows
This fixes an issue introduced in
340f531c71 where embedded OpenGL windows
would incorrectly have the WS_EX_LAYERED style bit set, which in turn
prevented them from displaying correctly.

Before the window-transparency refactoring, OpenGL windows would not
have the layered bit set because only peers with windowIsSemiTransparent
were created with the layered bit, and the layered bit was only updated
if the peer alpha was changed.

The new behaviour is to always set WS_EX_LAYERED if the peer's component
is non-opaque with no titlebar, or if the component has an alpha < 1.0f.
The OpenGLContext's placeholder component has no titlebar, so it must be
opaque in order to avoid setting the layered style bit.
2024-09-05 12:14:54 +01:00
reuk
109ec550b9
Direct2D: Fix typo in tests
This typo caused the Graphics tests to fail when the random seed was
0xb14c264a426e6987.
2024-09-05 12:14:03 +01:00
reuk
92cbbf3db1
VST3 SDK: Remove unused manifest 2024-09-05 12:12:37 +01:00
reuk
b106b19eae
AU Host: Avoid leaking CoreFoundation types returned from property queries 2024-09-05 12:12:01 +01:00
reuk
11821d88a4
Windows: Avoid attempting to dismiss modals during minimise/restore 2024-09-05 12:11:30 +01:00
reuk
5befcd43a9
EdgeTable: Use CopyableHeapBlock in implementation 2024-09-05 12:10:33 +01:00
reuk
2733c60a99
Resave all projects 2024-09-05 12:10:30 +01:00
reuk
5e9473ba89 CopyableHeapBlock: Add initial implementation 2024-09-04 18:53:18 +01:00
Anthony Nicholls
9b3a513ae3 VST3: Update SDK to 3.7.12 2024-09-04 15:49:36 +01:00
reuk
c49fe0b6be UnicodeGenerated: Improve memory usage during compilation with gcc-7 2024-09-04 14:56:29 +01:00
Anthony Nicholls
2d360165c5 macOS: Prevent negative corner sizes for rounded rectangles 2024-08-28 11:53:21 +01:00
Paul Gration
51edcaf842 Docs: Remove duplicate apt dependency 2024-08-27 14:51:45 +01:00
Yuki
faa850a48c Oboe: Remove an erroneous semicolon 2024-08-27 14:22:49 +01:00
attila
853e2052ff Use WebViewLifetimeListener in WebControlRelays 2024-08-26 15:30:58 +02:00
attila
b395239884 WebBrowserComponent: Add WebViewLifetimeListener 2024-08-26 13:25:28 +02:00
Anthony Nicholls
0802db13ee VST3: Support loading a VST2 state when a plugin implements getCompatibleClasses() 2024-08-24 08:38:10 +01:00
Anthony Nicholls
2c606d6612 VST3: Fix an issue migrating VST2 to VST3 states in Reaper
Reaper uses an undocumented version 0 of the fxbank struct, this could
be handled by JUCE but instead this solution switches to using methods
provided by the VST3 SDK to save and load VST2 states. This also has
the added benefit of no longer requiring the VST2 SDK to build a VST3
plugin that supports saving and loading VST2 states.
2024-08-24 08:38:10 +01:00
Anthony Nicholls
514ac22d6d macOS: Prevent an image mask from filling outside the clipping bounds 2024-08-23 15:53:43 +00:00
reuk
191dfe2e19
CMake: Fix uninitialized variable warnings when configuring for iOS 2024-08-23 16:12:30 +01:00
reuk
0ed2ae64fa
Windows: Fix issue where windows with titlebars reported the wrong transparency kind 2024-08-23 16:12:29 +01:00
reuk
9a93fb03a4 Direct2D: Add null check in PresentationQueue 2024-08-23 13:51:40 +01:00
reuk
b12088a1f6 Direct2D: Match system preferences for text antialiasing 2024-08-23 13:51:40 +01:00
reuk
340f531c71
Direct2D: Reinstate support for transparent windows 2024-08-22 20:19:49 +01:00
reuk
6f2293d91b
Windows: Fix conversion of WindowsBitmapImages to SoftwareBitmapImages 2024-08-22 18:18:17 +01:00
reuk
b7db89cb8e
Windows: Fix capture of software-rendered windows with per-pixel alpha 2024-08-22 18:18:17 +01:00
reuk
6cd018a679
Direct2D: Fix implementation of Direct2DPixelData::fromDirect2DBitmap
Previously, this function didn't store/copy the provided bitmap, so the
resulting image was blank. This also broke createSnapshot(), which would
always return a blank image.
2024-08-22 18:18:17 +01:00
reuk
348d638581
Direct2D: Temporarily disable window transparency for D2D windows 2024-08-22 18:18:17 +01:00
reuk
2a108ca582
Direct2D: Rename GDIContext and D2DContext 2024-08-22 18:18:16 +01:00
reuk
831c5142a4
Windows: Refactor WindowsBitmapData to expose updateLayeredWindow 2024-08-22 18:18:16 +01:00
reuk
328ad60d9e
Windows: Move definition of GDI window snapshot function 2024-08-22 18:18:16 +01:00
reuk
b90498d79b
Windows: Always use WS_POPUP style for windows without a native titlebar or shadow
If we don't do this, the top corners of the window may have unwanted
clipping applied, making the corners appear rounded.
2024-08-22 18:18:16 +01:00
reuk
afaf97fe16
Windows: Update minimise and maximise window flags
The docs for WS_MINIMIZEBOX and WS_MAXIMIZEBOX specify that WS_SYSMENU must be specified.
The docs for WS_SYSMENU specify that WS_CAPTION must be specified.
2024-08-22 18:18:16 +01:00
reuk
e9f2a94d62
Windows: Use new client rect helper in implementation of getScreenPosition() 2024-08-22 18:18:16 +01:00