--- uae/src/ncurses.c 2018/04/24 16:39:51 1.1.1.2 +++ uae/src/ncurses.c 2018/04/24 17:05:27 1.1.1.7 @@ -23,11 +23,10 @@ #include "config.h" #include "options.h" -#include "threaddep/penguin.h" +#include "threaddep/thread.h" #include "uae.h" #include "memory.h" #include "custom.h" -#include "readcpu.h" #include "newcpu.h" #include "xwin.h" #include "keyboard.h" @@ -352,7 +351,7 @@ static int getgraycol(int x, int y) } if (cm) c /= cm; - if (!currprefs.no_xhair) + if (! currprefs.curses_reverse_video) c = maxc - c; return graychar[x2graymap[c]]; } @@ -387,7 +386,7 @@ static int getcol(int x, int y) } if (cm) c /= cm; - if (!currprefs.no_xhair) + if (! currprefs.curses_reverse_video) c = maxc - c; return (graychar[x2graymap[c]] & ~A_COLOR) | COLOR_PAIR (mycolor2pair_map[bestcol]); } @@ -461,12 +460,12 @@ int graphics_init(void) int i; if (currprefs.color_mode > 16) - fprintf(stderr, "Bad color mode selected. Using default.\n"), currprefs.color_mode = 0; + write_log ("Bad color mode selected. Using default.\n"), currprefs.color_mode = 0; init_colors(); curses_init(); - fprintf(stderr,"Using %s.\n",longname()); + write_log("Using %s.\n",longname()); if (debugging) curses_exit (); @@ -484,6 +483,7 @@ int graphics_init(void) gfxvidinfo.rowbytes = gfxvidinfo.pixbytes * currprefs.gfx_width; gfxvidinfo.bufmem = (char *)calloc(gfxvidinfo.rowbytes, currprefs.gfx_height+1); gfxvidinfo.linemem = 0; + gfxvidinfo.emergmem = 0; gfxvidinfo.can_double = 0; switch (gfxvidinfo.pixbytes) { case 1: @@ -498,7 +498,7 @@ int graphics_init(void) break; } if(!gfxvidinfo.bufmem) { - fprintf(stderr,"Not enough memory.\n"); + write_log("Not enough memory.\n"); return 0; } @@ -636,6 +636,11 @@ void target_specific_usage(void) /***************************************************************************/ +int check_prefs_changed_gfx (void) +{ + return 0; +} + int debuggable(void) { return 1; @@ -650,8 +655,26 @@ void LED(int on) { } -void write_log (const char *buf) +void write_log (const char *buf, ...) { } +int lockscr (void) +{ + return 1; +} + +void unlockscr (void) +{ +} + +void target_save_options (FILE *f, struct uae_prefs *p) +{ + fprintf (f, "curses.reverse_video=%s\n", p->curses_reverse_video ? "true" : "false"); +} + +int target_parse_option (struct uae_prefs *p, char *option, char *value) +{ + return (cfgfile_yesno (option, value, "reverse_video", &p->curses_reverse_video)); +}