]> skyeroc.xyz Git - dgamelaunch/commitdiff
Blindly assume the user's terminal can do Unicode or be switched into it.
authorPasi Kallinen <paxed@alt.org>
Mon, 3 Oct 2011 15:34:01 +0000 (15:34 +0000)
committerPasi Kallinen <paxed@alt.org>
Mon, 3 Oct 2011 15:34:01 +0000 (15:34 +0000)
    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 <kilobyte@angband.pl>)

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@600 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index 6fe064df697ac175a0976e53306cd23e1bc3e5c9..d446408df4fa47b42380ea86a497479d982f0804 100644 (file)
@@ -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);