Skip to content

Commit

Permalink
init platform_runtime{.dpi{screen_dpi()}};
Browse files Browse the repository at this point in the history
  • Loading branch information
qPCR4vir committed May 22, 2024
1 parent 9e83616 commit c0b6e42
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/detail/platform_abstraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1276,8 +1276,8 @@ namespace nana

void platform_abstraction::initialize()
{
if (nullptr == data::storage)
data::storage = new platform_runtime;
if (data::storage) return;
data::storage = new platform_runtime{.dpi{screen_dpi()}};
}

void platform_abstraction::shutdown()
Expand All @@ -1304,8 +1304,7 @@ namespace nana
{
#ifdef NANA_WINDOWS
//Create default font object.
NONCLIENTMETRICS metrics = {};
metrics.cbSize = sizeof metrics;
NONCLIENTMETRICS metrics = {.cbSize = sizeof NONCLIENTMETRICS};
#if(WINVER >= 0x0600)
#if defined(NANA_MINGW)
OSVERSIONINFO osvi = {};
Expand Down

0 comments on commit c0b6e42

Please sign in to comment.