Replace LF with CRLF for render info on Windows

pull/785/head
unknown 2020-06-21 23:53:58 -07:00 committed by Levin Li
parent 4fd0562386
commit 94cd51ac64
1 changed files with 7 additions and 0 deletions

View File

@ -623,6 +623,13 @@ BOOL APIENTRY GLInfoProc(HWND hDlg,
case WM_INITDIALOG:
{
string s = Helper::getRenderInfo(appCore->getRenderer());
// Replace LF with CRLF
size_t startPos = 0;
while((startPos = s.find("\n", startPos)) != string::npos)
{
s.replace(startPos, 1, "\r\n");
startPos += 2;
}
s = UTF8ToCurrentCP(s);
SetDlgItemText(hDlg, IDC_GLINFO_TEXT, s.c_str());
}