Rev 44 | Rev 50 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 44 | Rev 48 | ||
---|---|---|---|
Line 95... | Line 95... | ||
95 | // could the init file be opened ? |
95 | // could the init file be opened ? |
96 | if (fp != NULL) |
96 | if (fp != NULL) |
97 | { |
97 | { |
98 | Debug_Log (L"===Found initialization file, parsing...===\n"); |
98 | Debug_Log (L"===Found initialization file, parsing...===\n"); |
99 | 99 | ||
100 | // SMP HACK -- |
100 | // SMP HACK -- assume our engine is CECP compatible and set the max CPUs to use to core max - 1 |
101 | // (the computer will look like hung if all CPU is taken) |
101 | // (the computer will look like hung if all CPU is taken) |
102 | if ((wcsistr (options.engine.program_options.name, L"Crafty") != NULL) || (wcsistr (options.engine.program_options.name, L"GNU Chess") != NULL)) |
- | |
103 | { |
- | |
104 |
|
102 | GetSystemInfo (&sysinfo); // get the number of cores and build the corresponding engine initialization order |
105 |
|
103 | Player_SendBuffer_Add (player, 1000, L"mt %d\n", max (1, sysinfo.dwNumberOfProcessors - 1)); |
106 | } |
- | |
107 | 104 | ||
108 | // read line per line |
105 | // read line per line |
109 | while (fgetws (widechar_buffer, WCHAR_SIZEOF (widechar_buffer), fp) != NULL) |
106 | while (fgetws (widechar_buffer, WCHAR_SIZEOF (widechar_buffer), fp) != NULL) |
110 | { |
107 | { |
111 | if ((widechar_buffer[0] == L'#') || (widechar_buffer[0] == L'\n')) |
108 | if ((widechar_buffer[0] == L'#') || (widechar_buffer[0] == L'\n')) |