--- np2/win9x/dialog/d_config.cpp 2003/10/31 03:40:10 1.5 +++ np2/win9x/dialog/d_config.cpp 2004/05/23 15:01:45 1.9 @@ -11,7 +11,7 @@ static const char str_2halfmhz[] = "2.4576MHz"; static const char str_2mhz[] = "1.9968MHz"; -static const char *basecstr[2] = {str_2halfmhz, str_2mhz}; +static const char *basecstr[2] = {str_2mhz, str_2halfmhz}; static const UINT32 mulval[10] = {1, 2, 4, 5, 6, 8, 10, 12, 16, 20}; static const char str_clockfmt[] = "%2u.%.4u"; @@ -49,7 +49,7 @@ static void cfgcreate(HWND hWnd) { UINT val; SETLISTSTR(hWnd, IDC_BASECLOCK, basecstr); - if (np2cfg.baseclock >= AVE(PCBASECLOCK25, PCBASECLOCK20)) { + if (np2cfg.baseclock < AVE(PCBASECLOCK25, PCBASECLOCK20)) { val = 0; } else { @@ -60,6 +60,17 @@ static void cfgcreate(HWND hWnd) { wsprintf(work, str_u, np2cfg.multiple); SetDlgItemText(hWnd, IDC_MULTIPLE, work); + if (!milstr_cmp(np2cfg.model, str_VM)) { + val = IDC_MODELVM; + } + else if (!milstr_cmp(np2cfg.model, str_EPSON)) { + val = IDC_MODELEPSON; + } + else { + val = IDC_MODELVX; + } + SetDlgItemCheck(hWnd, val, TRUE); + if (np2cfg.samplingrate < AVE(11025, 22050)) { val = IDC_RATE11; } @@ -73,6 +84,7 @@ static void cfgcreate(HWND hWnd) { wsprintf(work, str_u, np2cfg.delayms); SetDlgItemText(hWnd, IDC_SOUNDBUF, work); + SetDlgItemCheck(hWnd, IDC_ALLOWRESIZE, np2oscfg.thickframe); if (mmxflag & MMXFLAG_NOTSUPPORT) { EnableWindow(GetDlgItem(hWnd, IDC_DISABLEMMX), FALSE); SetDlgItemCheck(hWnd, IDC_DISABLEMMX, TRUE); @@ -91,6 +103,7 @@ static void cfgupdate(HWND hWnd) { UINT update; char work[32]; UINT val; +const char *str; update = 0; GetDlgItemText(hWnd, IDC_BASECLOCK, work, sizeof(work)); @@ -118,6 +131,20 @@ static void cfgupdate(HWND hWnd) { update |= SYS_UPDATECFG | SYS_UPDATECLOCK; } + if (GetDlgItemCheck(hWnd, IDC_MODELVM)) { + str = str_VM; + } + else if (GetDlgItemCheck(hWnd, IDC_MODELEPSON)) { + str = str_EPSON; + } + else { + str = str_VX; + } + if (milstr_cmp(np2cfg.model, str)) { + milstr_ncpy(np2cfg.model, str, sizeof(np2cfg.model)); + update |= SYS_UPDATECFG; + } + if (GetDlgItemCheck(hWnd, IDC_RATE11)) { val = 11025; } @@ -135,8 +162,8 @@ static void cfgupdate(HWND hWnd) { GetDlgItemText(hWnd, IDC_SOUNDBUF, work, sizeof(work)); val = (UINT)milstr_solveINT(work); - if (val < 100) { - val = 100; + if (val < 40) { + val = 40; } else if (val > 1000) { val = 1000; @@ -147,6 +174,12 @@ static void cfgupdate(HWND hWnd) { soundrenewal = 1; } + val = GetDlgItemCheck(hWnd, IDC_ALLOWRESIZE); + if (np2oscfg.thickframe != (BYTE)val) { + np2oscfg.thickframe = (BYTE)val; + update |= SYS_UPDATEOSCFG; + } + if (!(mmxflag & MMXFLAG_NOTSUPPORT)) { val = GetDlgItemCheck(hWnd, IDC_DISABLEMMX); if (np2oscfg.disablemmx != (BYTE)val) {