mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ScopedThreadDPIAwarenessSetter: Make moveable
This commit is contained in:
parent
880b76983e
commit
80bb7b0861
3 changed files with 8 additions and 3 deletions
|
|
@ -48,13 +48,13 @@ public:
|
|||
if (comp->isOnDesktop())
|
||||
{
|
||||
#if JUCE_WINDOWS
|
||||
const auto scope = [&]() -> std::unique_ptr<ScopedThreadDPIAwarenessSetter>
|
||||
const auto scope = [&]() -> std::optional<ScopedThreadDPIAwarenessSetter>
|
||||
{
|
||||
if (comp != nullptr)
|
||||
if (auto* handle = comp->getWindowHandle())
|
||||
return std::make_unique<ScopedThreadDPIAwarenessSetter> (handle);
|
||||
return ScopedThreadDPIAwarenessSetter (handle);
|
||||
|
||||
return nullptr;
|
||||
return {};
|
||||
}();
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue