Diff for /np2/x11/ini.c between versions 1.15 and 1.22

version 1.15, 2005/05/16 06:08:23 version 1.22, 2008/04/03 13:52:20
Line 1 Line 1
   /*      $Id$    */
   
 #include "compiler.h"  #include "compiler.h"
   
 #include "np2.h"  #include "np2.h"
Line 181  inirdsnddrv(const char *src, const INITB Line 183  inirdsnddrv(const char *src, const INITB
         *(UINT8 *)ini->value = snddrv_drv2num(src);          *(UINT8 *)ini->value = snddrv_drv2num(src);
 }  }
   
   static void
   inirdinterp(const char *src, const INITBL *ini)
   {
   
           if (!milstr_cmp(src, "NEAREST")) {
                   *(UINT8 *)ini->value = INTERP_NEAREST;
           } else if (!milstr_cmp(src, "TILES")) {
                   *(UINT8 *)ini->value = INTERP_TILES;
           } else if (!milstr_cmp(src, "HYPER")) {
                   *(UINT8 *)ini->value = INTERP_HYPER;
           } else {
                   *(UINT8 *)ini->value = INTERP_BILINEAR;
           }
   }
   
 static void update_iniread_flag(const INITBL *p);  static void update_iniread_flag(const INITBL *p);
   
 static BOOL  static BOOL
Line 265  inireadcb(void *arg, const char *para, c Line 282  inireadcb(void *arg, const char *para, c
                                 inirdsnddrv(work, p);                                  inirdsnddrv(work, p);
                                 break;                                  break;
   
                           case INITYPE_INTERP:
                                   milstr_ncpy(work, data, 512);
                                   inirdinterp(work, p);
                                   break;
   
                         default:                          default:
                                 rv = FALSE;                                  rv = FALSE;
                                 break;                                  break;
Line 339  iwss_extend: Line 361  iwss_extend:
         }          }
 }  }
   
   static const char *
   iniwrinterp(UINT8 interp)
   {
   
           if (interp == INTERP_NEAREST)
                   return "NEAREST";
           else if (interp == INTERP_TILES)
                   return "TILES";
           else if (interp == INTERP_HYPER)
                   return "HYPER";
           else
                   return "BILINEAR";
   }
   
 static BOOL read_iniread_flag(const INITBL *p);  static BOOL read_iniread_flag(const INITBL *p);
   
 void  void
Line 437  ini_write(const char *path, const char * Line 473  ini_write(const char *path, const char *
                                 SPRINTF(work, "%s", snddrv_num2drv(*(UINT8 *)p->value));                                  SPRINTF(work, "%s", snddrv_num2drv(*(UINT8 *)p->value));
                                 break;                                  break;
   
                           case INITYPE_INTERP:
                                   SPRINTF(work, "%s", iniwrinterp(*(UINT8 *)p->value));
                                   break;
   
                         default:                          default:
                                 set = FAILURE;                                  set = FAILURE;
                                 break;                                  break;
Line 480  static const INITBL iniitem[] = { Line 520  static const INITBL iniitem[] = {
         {"HDfolder", INITYPE_STR,       hddfolder,              MAX_PATH},          {"HDfolder", INITYPE_STR,       hddfolder,              MAX_PATH},
         {"bmap_Dir", INITYPE_STR,       bmpfilefolder,          MAX_PATH},          {"bmap_Dir", INITYPE_STR,       bmpfilefolder,          MAX_PATH},
         {"fontfile", INITYPE_STR,       np2cfg.fontfile,        MAX_PATH},          {"fontfile", INITYPE_STR,       np2cfg.fontfile,        MAX_PATH},
         {"biospath", INITYPE_STR,       np2cfg.biospath,        MAX_PATH},          {"biospath", INIRO_STR,         np2cfg.biospath,        MAX_PATH},
         {"hdrvroot", INIRO_STR,         np2cfg.hdrvroot,        MAX_PATH},          {"hdrvroot", INIRO_STR,         np2cfg.hdrvroot,        MAX_PATH},
         {"hdrv_acc", INIRO_UINT8,       &np2cfg.hdrvacc,        0},          {"hdrv_acc", INIRO_UINT8,       &np2cfg.hdrvacc,        0},
   
Line 590  static const INITBL iniitem[] = { Line 630  static const INITBL iniitem[] = {
         {"com3mmdl", INITYPE_STR,       np2oscfg.com[2].mdl,    64},          {"com3mmdl", INITYPE_STR,       np2oscfg.com[2].mdl,    64},
         {"com3mdef", INITYPE_STR,       np2oscfg.com[2].def,    MAX_PATH},          {"com3mdef", INITYPE_STR,       np2oscfg.com[2].def,    MAX_PATH},
   
   #if defined(SUPPORT_RESUME)
         {"e_resume", INITYPE_BOOL,      &np2oscfg.resume,       0},          {"e_resume", INITYPE_BOOL,      &np2oscfg.resume,       0},
   #endif
   #if defined(SUPPORT_STATSAVE)
         {"STATSAVE", INIRO_BOOL,        &np2oscfg.statsave,     0},          {"STATSAVE", INIRO_BOOL,        &np2oscfg.statsave,     0},
   #endif
 #if defined(GCC_CPU_ARCH_IA32)  #if defined(GCC_CPU_ARCH_IA32)
         {"nousemmx", INITYPE_BOOL,      &np2oscfg.disablemmx,   0},          {"nousemmx", INITYPE_BOOL,      &np2oscfg.disablemmx,   0},
 #endif  #endif
Line 601  static const INITBL iniitem[] = { Line 645  static const INITBL iniitem[] = {
         {"jast_snd", INITYPE_BOOL,      &np2oscfg.jastsnd,      0},          {"jast_snd", INITYPE_BOOL,      &np2oscfg.jastsnd,      0},
   
         {"sounddrv", INITYPE_SNDDRV,    &np2oscfg.snddrv,       0},          {"sounddrv", INITYPE_SNDDRV,    &np2oscfg.snddrv,       0},
         {"audiodev", INITYPE_STR,       &np2oscfg.audiodev,     MAX_PATH},  
         {"MIDIOUTd", INITYPE_STR,       &np2oscfg.MIDIDEV[0],   MAX_PATH},          {"MIDIOUTd", INITYPE_STR,       &np2oscfg.MIDIDEV[0],   MAX_PATH},
         {"MIDIIN_d", INITYPE_STR,       &np2oscfg.MIDIDEV[1],   MAX_PATH},          {"MIDIIN_d", INITYPE_STR,       &np2oscfg.MIDIDEV[1],   MAX_PATH},
         {"MIDIWAIT", INITYPE_UINT32,    &np2oscfg.MIDIWAIT,     0},          {"MIDIWAIT", INITYPE_UINT32,    &np2oscfg.MIDIWAIT,     0},
   
         {"sharepix", INIRO_BOOL,        &np2oscfg.shared_pixmap,0},          {"dinterp_", INITYPE_INTERP,    &np2oscfg.drawinterp,   0},
           {"fullscrn", INITYPE_UINT32,    &ignore_fullscreen_mode,0},
         {"toolkit_", INIRO_STR,         &np2oscfg.toolkit,      sizeof(np2oscfg.toolkit)},          {"F11_KEY_", INITYPE_UINT8,     &np2oscfg.F11KEY,       0},
           {"READONLY", INIRO_BOOL,        &np2oscfg.cfgreadonly,  0},
   
         {"I286SAVE", INIRO_BOOL,        &np2oscfg.I286SAVE,     0}          {"I286SAVE", INIRO_BOOL,        &np2oscfg.I286SAVE,     0},
 };  };
 #define INIITEMS        (sizeof(iniitem) / sizeof(iniitem[0]))  #define INIITEMS        (sizeof(iniitem) / sizeof(iniitem[0]))
   

Removed from v.1.15  
changed lines
  Added in v.1.22


RetroPC.NET-CVS <cvs@retropc.net>