diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-04-18 12:46:46 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-04-18 12:46:46 +0200 |
commit | 2cce0ad51d656e6aa49636c817a5fe1e2252f4ab (patch) | |
tree | 898fd65001eb14f06c7f9fe4e9c6fa130b5563fd /crawl-ref/source/libw32c.cc | |
parent | 264a91209d3b4e1c4a59ccdefa8db91ce93f16cf (diff) | |
download | crawl-ref-2cce0ad51d656e6aa49636c817a5fe1e2252f4ab.tar.gz crawl-ref-2cce0ad51d656e6aa49636c817a5fe1e2252f4ab.zip |
Hide output charset conversions behind a macro.
They're not that interesting and cloud code readability. What humans care
about is the conversion of Crawl's internal format to native strings (OUTS)
or native wide strings (OUTW, Windows only).
Diffstat (limited to 'crawl-ref/source/libw32c.cc')
-rw-r--r-- | crawl-ref/source/libw32c.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc index 40ab76af3e..b6361860d0 100644 --- a/crawl-ref/source/libw32c.cc +++ b/crawl-ref/source/libw32c.cc @@ -349,7 +349,7 @@ void init_libw32c(void) if (!GetConsoleTitleW(oldTitle, 78)) *oldTitle = 0; - SetConsoleTitleW(utf8_to_16(title.c_str()).c_str()); + SetConsoleTitleW(OUTW(title)); // Use the initial Windows setting for cursor size if it exists. // TODO: Respect changing cursor size manually while Crawl is running. @@ -553,7 +553,7 @@ static void cprintf_aux(const char *s) // early out -- not initted yet if (outbuf == NULL) { - printf("%S", utf8_to_16(s).c_str()); + printf("%S", OUTW(s)); return; } |