diff options
author | RadAd <adamgates84+github@gmail.com> | 2019-05-27 14:07:56 +1000 |
---|---|---|
committer | RadAd <adamgates84+github@gmail.com> | 2019-05-27 14:07:56 +1000 |
commit | 303f2371b4801f131830311230d9962d63e74a4f (patch) | |
tree | 8858adc461ea9254614538d2d5474eff606d6fff | |
parent | f7762daa92f584c34af1a1dcbe8ff400eb9921a0 (diff) | |
download | RadTerminal-303f2371b4801f131830311230d9962d63e74a4f.tar.gz RadTerminal-303f2371b4801f131830311230d9962d63e74a4f.zip |
ansi fixes
-rw-r--r-- | ProcessUtils.cpp | 2 | ||||
-rw-r--r-- | RadTerminal.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ProcessUtils.cpp b/ProcessUtils.cpp index 4a44ae3..e3effc9 100644 --- a/ProcessUtils.cpp +++ b/ProcessUtils.cpp @@ -87,7 +87,7 @@ namespace { } TCHAR localcmd[MAX_PATH]; - wcscpy_s(localcmd, cmd); + _tcscpy_s(localcmd, cmd); if (!CreateProcess(nullptr, localcmd, nullptr, nullptr, bInheritHandles, dwCreationFlags, nullptr, nullptr, &si.StartupInfo, &spd.pi)) { spd.hr = HRESULT_FROM_WIN32(GetLastError()); diff --git a/RadTerminal.cpp b/RadTerminal.cpp index 2e6e2c7..dec0b31 100644 --- a/RadTerminal.cpp +++ b/RadTerminal.cpp @@ -562,9 +562,13 @@ BOOL RadTerminalWindowOnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct) tsm_vte_set_osc_cb(data->vte, tsm_vte_osc, hWnd); if (rtc->strScheme != nullptr) { +#ifdef _UNICODE char scheme[1024]; WideCharToMultiByte(CP_UTF8, 0, rtc->strScheme, -1, scheme, ARRAYSIZE(scheme), nullptr, nullptr); e = tsm_vte_set_palette(data->vte, scheme); +#else + e = tsm_vte_set_palette(data->vte, rtc->strScheme); +#endif } for (int b = 0; b < 2; ++b) |