From: Pasi Kallinen Date: Mon, 3 Oct 2011 15:34:01 +0000 (+0000) Subject: Blindly assume the user's terminal can do Unicode or be switched into it. X-Git-Tag: v1.6.1-roc-dev~110 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=cc6cf14b6f8a107c41203212fa2f238f4da21664;p=dgamelaunch Blindly assume the user's terminal can do Unicode or be switched into it. I expect this to work in 99% cases, and if it fails, there's probably no regression since I don't know of a terminal that can be easily switched to CP437 but doesn't support "\e%G". It would be better to check if the terminal uses Unicode and convert everything to ASCII, and I'll do that soon, but this version might be good enough for now. (Adam Borowski ) git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@600 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- diff --git a/dgamelaunch.c b/dgamelaunch.c index 6fe064d..d446408 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -1048,6 +1048,7 @@ inprogressmenu (int gameid) break; case 12: case 18: /* ^L, ^R */ + write(1, "\033%G", 3); clear (); break; @@ -1085,6 +1086,7 @@ watchgame: clear (); refresh (); endwin (); + write(1, "\033%G", 3); #ifdef USE_SHMEM signals_block(); if (games[idx]->is_in_shm) { @@ -1537,6 +1539,7 @@ initcurses () use_default_colors(); init_pair(1, -1, -1); init_pair(2, COLOR_RED, -1); + write(1, "\033%G", 3); #endif clear(); refresh(); @@ -2382,6 +2385,7 @@ runmenuloop(struct dg_menu *menu) while (1) { if (doclear) { doclear = 0; + write(1, "\033%G", 3); clear(); } drawbanner(&ban, 1, 0);