--- np2/win9x/dialog/d_config.cpp 2003/11/02 17:03:24 1.6 +++ np2/win9x/dialog/d_config.cpp 2004/05/23 15:01:45 1.9 @@ -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) {