|
|
| version 1.2, 2003/11/06 18:27:59 | version 1.3, 2004/01/05 03:59:11 |
|---|---|
| Line 7 | Line 7 |
| */ | */ |
| #include "compiler.h" | #include "compiler.h" |
| #include "strres.h" | |
| #include "np2.h" | #include "np2.h" |
| #include "pccore.h" | #include "pccore.h" |
| #include "ini.h" | #include "ini.h" |
| Line 85 static void setCPUClock(void) { | Line 86 static void setCPUClock(void) { |
| static void initConfigWindow(void) { | static void initConfigWindow(void) { |
| SInt16 i; | SInt16 i; |
| SInt32 val; | |
| Str255 title; | Str255 title; |
| if (np2cfg.baseclock >= AVE(PCBASECLOCK25, PCBASECLOCK20)) { | if (np2cfg.baseclock >= AVE(PCBASECLOCK25, PCBASECLOCK20)) { |
| Line 133 static void initConfigWindow(void) { | Line 135 static void initConfigWindow(void) { |
| } | } |
| SetControlValue(getControlRefByID('Mltp', 5, configWin), i); | SetControlValue(getControlRefByID('Mltp', 5, configWin), i); |
| setCPUClock(); | setCPUClock(); |
| if (!milstr_cmp(np2cfg.model, str_VM)) { | |
| val = 1; | |
| } | |
| else if (!milstr_cmp(np2cfg.model, str_EPSON)) { | |
| val = 3; | |
| } | |
| else { | |
| val = 2; | |
| } | |
| SetControlValue(getControlRefByID('Arch', 0, configWin), val); | |
| NumToString(np2cfg.delayms, title); | NumToString(np2cfg.delayms, title); |
| if (np2cfg.samplingrate < AVE(11025, 22050)) { | if (np2cfg.samplingrate < AVE(11025, 22050)) { |
| i=1; | i=1; |
| Line 157 static pascal OSStatus cfWinproc(EventHa | Line 171 static pascal OSStatus cfWinproc(EventHa |
| UINT32 dval; | UINT32 dval; |
| UINT16 wval; | UINT16 wval; |
| UINT update; | UINT update; |
| const char *str; | |
| if (GetEventClass(event)==kEventClassCommand && GetEventKind(event)==kEventCommandProcess ) { | if (GetEventClass(event)==kEventClassCommand && GetEventKind(event)==kEventCommandProcess ) { |
| GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd); | GetEventParameter(event, kEventParamDirectObject, typeHICommand, NULL, sizeof(HICommand), NULL, &cmd); |
| Line 187 static pascal OSStatus cfWinproc(EventHa | Line 202 static pascal OSStatus cfWinproc(EventHa |
| np2cfg.multiple = dval; | np2cfg.multiple = dval; |
| update |= SYS_UPDATECFG | SYS_UPDATECLOCK; | update |= SYS_UPDATECFG | SYS_UPDATECLOCK; |
| } | } |
| dval=getSelectedValue('Arch', 0); | |
| if (dval == 1) { | |
| str = str_VM; | |
| } | |
| else if (dval == 3) { | |
| str = str_EPSON; | |
| } | |
| else { | |
| str = str_VX; | |
| } | |
| if (milstr_cmp(np2cfg.model, str)) { | |
| milstr_ncpy(np2cfg.model, str, sizeof(np2cfg.model)); | |
| update |= SYS_UPDATECFG; | |
| } | |
| dval=getSelectedValue('Rate', 8); | dval=getSelectedValue('Rate', 8); |
| if (dval==1) { | if (dval==1) { |
| wval = 11025; | wval = 11025; |