mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- Use the Unicode RichEdit control instead of the MBCS version, so as to enforce the use
of code page 1252 for output text. This is noticeable, for example, with the FMOD copyright notice where the copyright symbol appears as ゥ (halfwidth katakana small U) with code page 932. SVN r2177 (trunk)
This commit is contained in:
parent
ad54cfcf94
commit
0b2c2e1cb3
2 changed files with 8 additions and 5 deletions
|
@ -422,7 +422,7 @@ LRESULT CALLBACK LConProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
TEXTMETRIC tm;
|
||||
HINSTANCE inst = (HINSTANCE)(LONG_PTR)GetWindowLongPtr(hWnd, GWLP_HINSTANCE);
|
||||
DRAWITEMSTRUCT *drawitem;
|
||||
CHARFORMAT2 format;
|
||||
CHARFORMAT2W format;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
|
@ -453,7 +453,7 @@ LRESULT CALLBACK LConProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
SelectObject (hdc, oldfont);
|
||||
|
||||
// Create log read-only edit control
|
||||
view = CreateWindowEx (WS_EX_NOPARENTNOTIFY, RICHEDIT_CLASS, NULL,
|
||||
view = CreateWindowEx (WS_EX_NOPARENTNOTIFY, "RichEdit20W", NULL,
|
||||
WS_CHILD | WS_VISIBLE | WS_VSCROLL |
|
||||
ES_LEFT | ES_MULTILINE | WS_CLIPSIBLINGS,
|
||||
0, 0, 0, 0,
|
||||
|
@ -476,8 +476,8 @@ LRESULT CALLBACK LConProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
format.yHeight = 200;
|
||||
format.crTextColor = RGB(223,223,223);
|
||||
format.bPitchAndFamily = FF_SWISS | VARIABLE_PITCH;
|
||||
strcpy(format.szFaceName, "DejaVu Sans"); // At least I have it. :p
|
||||
SendMessage (view, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&format);
|
||||
wcscpy(format.szFaceName, L"DejaVu Sans"); // At least I have it. :p
|
||||
SendMessageW(view, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&format);
|
||||
|
||||
ConWindow = view;
|
||||
ReleaseDC (hWnd, hdc);
|
||||
|
|
|
@ -944,7 +944,10 @@ void I_PrintStr(const char *cp)
|
|||
buf[bpos] = 0;
|
||||
if (edit != NULL)
|
||||
{
|
||||
SendMessage(edit, EM_REPLACESEL, FALSE, (LPARAM)buf);
|
||||
wchar_t wbuf[countof(buf)];
|
||||
MultiByteToWideChar(1252 /* Latin 1 */, 0, buf, bpos, wbuf, countof(wbuf));
|
||||
wbuf[bpos] = 0;
|
||||
SendMessageW(edit, EM_REPLACESEL, FALSE, (LPARAM)wbuf);
|
||||
}
|
||||
if (StdOut != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue