File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,9 @@ void FontResource::_regenerateFont()
133133 fontResource.dfBitsOffset = sizeof (FONTINFO);
134134 fontResource.dfFlags = DFF_FIXED | DFF_1COLOR;
135135
136- // We use the steady_clock to create a unique name for the font.
137- const auto uniqueValue = std::chrono::steady_clock::now (). time_since_epoch (). count () ;
138- sprintf_s (fontResource.szFaceName , " WTSOFTFONT%016llX" , uniqueValue );
136+ // We use an atomic counter to create a locally- unique name for the font.
137+ static std::atomic< uint64_t > faceNameCounter ;
138+ sprintf_s (fontResource.szFaceName , " WTSOFTFONT%016llX" , faceNameCounter++ );
139139
140140 // Each character has a fixed size and position in the font bitmap, but we
141141 // still need to fill in the header table with that information.
You can’t perform that action at this time.
0 commit comments