Diff for /np2/win9x/dialog/d_config.cpp between versions 1.10 and 1.11

version 1.10, 2005/02/07 15:39:27 version 1.11, 2005/02/09 20:11:36
Line 9 Line 9
 #include        "pccore.h"  #include        "pccore.h"
   
   
 static const char str_2halfmhz[] = "2.4576MHz";  static const OEMCHAR str_2halfmhz[] = OEMTEXT("2.4576MHz");
 static const char str_2mhz[] = "1.9968MHz";  static const OEMCHAR str_2mhz[] = OEMTEXT("1.9968MHz");
 static const char *basecstr[2] = {str_2mhz, str_2halfmhz};  static const OEMCHAR *basecstr[2] = {str_2mhz, str_2halfmhz};
 static const UINT32 mulval[10] = {1, 2, 4, 5, 6, 8, 10, 12, 16, 20};  static const UINT32 mulval[10] = {1, 2, 4, 5, 6, 8, 10, 12, 16, 20};
 static const char str_clockfmt[] = "%2u.%.4u";  static const OEMCHAR str_clockfmt[] = OEMTEXT("%2u.%.4u");
   
   
 static void setclock(HWND hWnd, UINT multiple) {  static void setclock(HWND hWnd, UINT multiple) {
   
         UINT32  clock;          UINT32  clock;
         char    work[32];          OEMCHAR work[32];
   
         GetDlgItemText(hWnd, IDC_BASECLOCK, work, sizeof(work));          GetDlgItemText(hWnd, IDC_BASECLOCK, work, NELEMENTS(work));
         if (work[0] == '1') {          if (work[0] == '1') {
                 clock = PCBASECLOCK20 / 100;                  clock = PCBASECLOCK20 / 100;
         }          }
Line 29  static void setclock(HWND hWnd, UINT mul Line 29  static void setclock(HWND hWnd, UINT mul
                 clock = PCBASECLOCK25 / 100;                  clock = PCBASECLOCK25 / 100;
         }          }
         if (multiple == 0) {          if (multiple == 0) {
                 GetDlgItemText(hWnd, IDC_MULTIPLE, work, sizeof(work));                  GetDlgItemText(hWnd, IDC_MULTIPLE, work, NELEMENTS(work));
                 multiple = (UINT)milstr_solveINT(work);                  multiple = (UINT)milstr_solveINT(work);
         }          }
         if (multiple < 1) {          if (multiple < 1) {
Line 39  static void setclock(HWND hWnd, UINT mul Line 39  static void setclock(HWND hWnd, UINT mul
                 multiple = 32;                  multiple = 32;
         }          }
         clock *= multiple;          clock *= multiple;
         wsprintf(work, str_clockfmt, clock / 10000, clock % 10000);          OEMSPRINTF(work, str_clockfmt, clock / 10000, clock % 10000);
         SetDlgItemText(hWnd, IDC_CLOCKMSG, work);          SetDlgItemText(hWnd, IDC_CLOCKMSG, work);
 }  }
   
 static void cfgcreate(HWND hWnd) {  static void cfgcreate(HWND hWnd) {
   
         char    work[32];          OEMCHAR work[32];
         UINT    val;          UINT    val;
   
         SETLISTSTR(hWnd, IDC_BASECLOCK, basecstr);          SETLISTSTR(hWnd, IDC_BASECLOCK, basecstr);
Line 57  static void cfgcreate(HWND hWnd) { Line 57  static void cfgcreate(HWND hWnd) {
         }          }
         SendDlgItemMessage(hWnd, IDC_BASECLOCK, CB_SETCURSEL, val, 0);          SendDlgItemMessage(hWnd, IDC_BASECLOCK, CB_SETCURSEL, val, 0);
         SETLISTUINT32(hWnd, IDC_MULTIPLE, mulval);          SETLISTUINT32(hWnd, IDC_MULTIPLE, mulval);
         wsprintf(work, str_u, np2cfg.multiple);          OEMSPRINTF(work, str_u, np2cfg.multiple);
         SetDlgItemText(hWnd, IDC_MULTIPLE, work);          SetDlgItemText(hWnd, IDC_MULTIPLE, work);
   
         if (!milstr_cmp(np2cfg.model, str_VM)) {          if (!milstr_cmp(np2cfg.model, str_VM)) {
Line 81  static void cfgcreate(HWND hWnd) { Line 81  static void cfgcreate(HWND hWnd) {
                 val = IDC_RATE44;                  val = IDC_RATE44;
         }          }
         SetDlgItemCheck(hWnd, val, TRUE);          SetDlgItemCheck(hWnd, val, TRUE);
         wsprintf(work, str_u, np2cfg.delayms);          OEMSPRINTF(work, str_u, np2cfg.delayms);
         SetDlgItemText(hWnd, IDC_SOUNDBUF, work);          SetDlgItemText(hWnd, IDC_SOUNDBUF, work);
   
         SetDlgItemCheck(hWnd, IDC_ALLOWRESIZE, np2oscfg.thickframe);          SetDlgItemCheck(hWnd, IDC_ALLOWRESIZE, np2oscfg.thickframe);
Line 100  static void cfgcreate(HWND hWnd) { Line 100  static void cfgcreate(HWND hWnd) {
   
 static void cfgupdate(HWND hWnd) {  static void cfgupdate(HWND hWnd) {
   
         UINT    update;          UINT            update;
         char    work[32];          OEMCHAR         work[32];
         UINT    val;          UINT            val;
 const char      *str;  const OEMCHAR   *str;
   
         update = 0;          update = 0;
         GetDlgItemText(hWnd, IDC_BASECLOCK, work, sizeof(work));          GetDlgItemText(hWnd, IDC_BASECLOCK, work, NELEMENTS(work));
         if (work[0] == '1') {          if (work[0] == '1') {
                 val = PCBASECLOCK20;                  val = PCBASECLOCK20;
         }          }
Line 141  const char *str; Line 141  const char *str;
                 str = str_VX;                  str = str_VX;
         }          }
         if (milstr_cmp(np2cfg.model, str)) {          if (milstr_cmp(np2cfg.model, str)) {
                 milstr_ncpy(np2cfg.model, str, sizeof(np2cfg.model));                  milstr_ncpy(np2cfg.model, str, NELEMENTS(np2cfg.model));
                 update |= SYS_UPDATECFG;                  update |= SYS_UPDATECFG;
         }          }
   
Line 160  const char *str; Line 160  const char *str;
                 soundrenewal = 1;                  soundrenewal = 1;
         }          }
   
         GetDlgItemText(hWnd, IDC_SOUNDBUF, work, sizeof(work));          GetDlgItemText(hWnd, IDC_SOUNDBUF, work, NELEMENTS(work));
         val = (UINT)milstr_solveINT(work);          val = (UINT)milstr_solveINT(work);
         if (val < 40) {          if (val < 40) {
                 val = 40;                  val = 40;

Removed from v.1.10  
changed lines
  Added in v.1.11


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