// engine_open()
void engine_open(engine_t * engine){
- int affinity;
+ int affinity= -1;
pipex_open(engine->pipex,
"Engine",
option_get_string(Option,"EngineDir"),
option_get_string(Option,"EngineCommand"));
if(pipex_active(engine->pipex)){
//play with affinity (bad idea)
- affinity=option_get_int(Option,"Affinity");
+ sscanf(option_get_string(Option,"Affinity"), "%x", &affinity);
if(affinity!=-1) set_affinity(engine,affinity); //AAA
// set a low priority
if (option_get_bool(Option,"UseNice")){
{ "UCIVersion", "spin","1","2", "2" , NULL,0,NNB, PG|XBOARD},
{ "CanPonder", "check","1","2", "false" , NULL,0,NNB, PG|XBOARD},
{ "SyncStop", "check","1","2", "false" , NULL,0,NNB, PG|XBOARD|XBSEL},
- { "Affinity", "spin","-1","32", "-1" , NULL,0,NNB, PG|XBOARD},
+ { "Affinity", "spin","0","0", "FFFFFFFF" , NULL,0,NNB, PG|XBOARD},
{ "RepeatPV", "check","0","0", "true" , NULL,0,NNB, PG|XBOARD},
{ "PromoteWorkAround","check","0","0", "false" , NULL,0,NNB, PG|XBOARD},