Skip to content

Commit

Permalink
correct file encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
ccyybn authored and fxliang committed Jun 13, 2024
1 parent 369834c commit 2ca5a52
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Binary file modified WeaselDeployer/resource.h
Binary file not shown.
4 changes: 2 additions & 2 deletions WeaselUI/StandardLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void weasel::StandardLayout::GetTextSizeDW(
lpSize->cy = 0;
return;
}
// 创建文本布局
// 创建文本布局
if (pTextFormat != NULL) {
if (_style.layout_type == UIStyle::LAYOUT_VERTICAL_TEXT)
hr = pDWR->CreateTextLayout(text.c_str(), (int)nCount, pTextFormat.Get(),
Expand All @@ -43,7 +43,7 @@ void weasel::StandardLayout::GetTextSizeDW(
pDWR->SetLayoutReadingDirection(DWRITE_READING_DIRECTION_TOP_TO_BOTTOM);
pDWR->SetLayoutFlowDirection(flow);
}
// 获取文本尺寸
// 获取文本尺寸
DWRITE_TEXT_METRICS textMetrics;
hr = pDWR->GetLayoutMetrics(&textMetrics);
sz = D2D1::SizeF(ceil(textMetrics.widthIncludingTrailingWhitespace),
Expand Down
8 changes: 4 additions & 4 deletions include/VersionHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ typedef __success(return >= 0) LONG NTSTATUS;

inline BOOL GetVersionEx2(LPOSVERSIONINFOW lpVersionInformation)
{
HMODULE hNtDll = GetModuleHandleW(L"NTDLL"); // 获取ntdll.dll的句柄
typedef NTSTATUS(NTAPI* tRtlGetVersion)(PRTL_OSVERSIONINFOW povi); // RtlGetVersion的原型
HMODULE hNtDll = GetModuleHandleW(L"NTDLL"); // 获取ntdll.dll的句柄
typedef NTSTATUS(NTAPI* tRtlGetVersion)(PRTL_OSVERSIONINFOW povi); // RtlGetVersion的原型
tRtlGetVersion pRtlGetVersion = NULL;
if (hNtDll)
{
pRtlGetVersion = (tRtlGetVersion)GetProcAddress(hNtDll, "RtlGetVersion"); // 获取RtlGetVersion地址
pRtlGetVersion = (tRtlGetVersion)GetProcAddress(hNtDll, "RtlGetVersion"); // 获取RtlGetVersion地址
}
if (pRtlGetVersion)
{
return pRtlGetVersion((PRTL_OSVERSIONINFOW)lpVersionInformation) >= 0; // 调用RtlGetVersion
return pRtlGetVersion((PRTL_OSVERSIONINFOW)lpVersionInformation) >= 0; // 调用RtlGetVersion
}
return FALSE;
}
Expand Down
Binary file modified include/resource.h
Binary file not shown.

0 comments on commit 2ca5a52

Please sign in to comment.