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