Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ if(APPLE)
BUNDLE DESTINATION "Applications"
COMPONENT "Standalone")
elseif(WIN32)
# MSVC 14.44+ introduced a constexpr std::mutex constructor that zero-initializes
# _Thread_id to -1. In debug builds, _Mtx_lock's deadlock detection can misfire
# when JUCE acquires a mutex inside a noexcept function (MessageManager::isThisTheMessageThread),
# causing std::terminate(). This define restores the old _Mtx_init_in_situ path.
target_compile_definitions(element_app PRIVATE
$<$<CONFIG:Debug>:_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR>)
if(ELEMENT_ENABLE_UPDATER)
target_link_libraries(element_app PRIVATE WinSparkle::WinSparkle)
target_sources(element_app PRIVATE src/winsparkle.cc)
Expand Down
7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,10 @@ if(ELEMENT_ENABLE_VST2)
target_compile_definitions(element PUBLIC JUCE_PLUGINHOST_VST=1)
target_link_libraries(element PUBLIC juce_vst2_sdk)
endif()

# MSVC 14.44+ constexpr mutex constructor workaround (debug only).
# See CMakeLists.txt in the root for explanation.
if(MSVC)
target_compile_definitions(element PRIVATE
$<$<CONFIG:Debug>:_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR>)
endif()
7 changes: 3 additions & 4 deletions src/ui/grapheditorcomponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,13 @@ class GraphEditor : public juce::Component
{
g.fillAll (findColour (Style::widgetBackgroundColorId).darker());
}

void resized() override
{
auto r = getLocalBounds();
_viewport.setBounds (r);
if (_editor.getWidth() < _viewport.getWidth() || _editor.getHeight() < _viewport.getHeight())
{
_editor.setBounds (_viewport.getBounds());
}
_editor.setSize (jmax (_editor.getWidth(), _viewport.getWidth()),
jmax (_editor.getHeight(), _viewport.getHeight()));
}

juce::Viewport& viewport() { return _viewport; }
Expand Down
Loading