Browse Source

GUI: Don't use MB_PRECOMPOSED due to failing on 15063

pull/4392/head
Amrsatrio 1 year ago
parent
commit
80b5d73d22
  1. 2
      ExplorerPatcher/updates.cpp
  2. 20
      ep_gui/GUI.c

2
ExplorerPatcher/updates.cpp

@ -271,7 +271,7 @@ BOOL IsUpdateAvailableHelper(
{ {
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
jsonStr.c_str(), jsonStr.c_str(),
-1, -1,
pszJsonStr, pszJsonStr,

20
ep_gui/GUI.c

@ -1239,7 +1239,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
ZeroMemory(section, MAX_LINE_LENGTH * sizeof(wchar_t)); ZeroMemory(section, MAX_LINE_LENGTH * sizeof(wchar_t));
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
line[1] == '-' ? line + 2 : line + 1, line[1] == '-' ? line + 2 : line + 1,
numChRd - (line[1] == '-' ? 5 : 4), numChRd - (line[1] == '-' ? 5 : 4),
section, section,
@ -1279,7 +1279,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
ZeroMemory(text, (MAX_LINE_LENGTH + 3) * sizeof(wchar_t)); ZeroMemory(text, (MAX_LINE_LENGTH + 3) * sizeof(wchar_t));
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
line + 3, line + 3,
numChRd - 3, numChRd - 3,
text, text,
@ -1362,7 +1362,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
ZeroMemory(text, (MAX_LINE_LENGTH + 3) * sizeof(wchar_t)); ZeroMemory(text, (MAX_LINE_LENGTH + 3) * sizeof(wchar_t));
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
line + 3, line + 3,
numChRd - 3, numChRd - 3,
text, text,
@ -1912,7 +1912,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
ZeroMemory(wszName, MAX_PATH * sizeof(wchar_t)); ZeroMemory(wszName, MAX_PATH * sizeof(wchar_t));
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
line2 + 2, line2 + 2,
numChRd2 - 2, numChRd2 - 2,
wszName, wszName,
@ -2190,7 +2190,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
ZeroMemory(wszName, MAX_PATH * sizeof(wchar_t)); ZeroMemory(wszName, MAX_PATH * sizeof(wchar_t));
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
line2 + 2, line2 + 2,
numChRd2 - 2, numChRd2 - 2,
wszName, wszName,
@ -2339,7 +2339,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
text[2] = L' '; text[2] = L' ';
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
!strncmp(line, ";c ", 3) || !strncmp(line, ";z ", 3) ? strchr(line + 3, ' ') + 1 : line + 3, !strncmp(line, ";c ", 3) || !strncmp(line, ";z ", 3) ? strchr(line + 3, ' ') + 1 : line + 3,
numChRd - 3, numChRd - 3,
text + 3, text + 3,
@ -2399,7 +2399,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
wchar_t* miText = malloc(MAX_PATH * sizeof(wchar_t)); wchar_t* miText = malloc(MAX_PATH * sizeof(wchar_t));
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
ln, ln,
MAX_PATH, MAX_PATH,
miText, miText,
@ -2442,7 +2442,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
if (p) *p = 0; if (p) *p = 0;
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
l + 1, l + 1,
numChRd - 1, numChRd - 1,
wszPrompt, wszPrompt,
@ -2457,7 +2457,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
if (p) *p = 0; if (p) *p = 0;
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
l + 1, l + 1,
numChRd - 1, numChRd - 1,
wszFallbackDefault, wszFallbackDefault,
@ -2486,7 +2486,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
ZeroMemory(name, MAX_LINE_LENGTH * sizeof(wchar_t)); ZeroMemory(name, MAX_LINE_LENGTH * sizeof(wchar_t));
MultiByteToWideChar( MultiByteToWideChar(
CP_UTF8, CP_UTF8,
MB_PRECOMPOSED, 0,
line[0] == '"' ? line + 1 : line, line[0] == '"' ? line + 1 : line,
numChRd, numChRd,
name, name,

Loading…
Cancel
Save