log affinity mask
This commit is contained in:
parent
eb2040a3c5
commit
c0f8d4a164
1 changed files with 11 additions and 7 deletions
18
src/config.c
18
src/config.c
|
@ -115,20 +115,24 @@ void cfg_load()
|
||||||
g_ddraw->flip_limiter.tick_length = (DWORD)(flip_len + 0.5f);
|
g_ddraw->flip_limiter.tick_length = (DWORD)(flip_len + 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg_get_bool("singlecpu", TRUE))
|
|
||||||
{
|
|
||||||
SetProcessAffinityMask(GetCurrentProcess(), 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DWORD system_affinity;
|
DWORD system_affinity;
|
||||||
DWORD proc_affinity;
|
DWORD proc_affinity;
|
||||||
HANDLE proc = GetCurrentProcess();
|
HANDLE proc = GetCurrentProcess();
|
||||||
|
|
||||||
if (GetProcessAffinityMask(proc, &proc_affinity, &system_affinity))
|
if (cfg_get_bool("singlecpu", TRUE))
|
||||||
|
{
|
||||||
|
SetProcessAffinityMask(proc, 1);
|
||||||
|
}
|
||||||
|
else if (GetProcessAffinityMask(proc, &proc_affinity, &system_affinity))
|
||||||
|
{
|
||||||
SetProcessAffinityMask(proc, system_affinity);
|
SetProcessAffinityMask(proc, system_affinity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GetProcessAffinityMask(proc, &proc_affinity, &system_affinity))
|
||||||
|
{
|
||||||
|
TRACE(" proc_affinity=%08X, system_affinity=%08X\n", proc_affinity, system_affinity);
|
||||||
|
}
|
||||||
|
|
||||||
/* to do: read .glslp config file instead of the shader and apply the correct settings */
|
/* to do: read .glslp config file instead of the shader and apply the correct settings */
|
||||||
cfg_get_string("shader", "Shaders\\cubic\\catmull-rom-bilinear.glsl", g_ddraw->shader, sizeof(g_ddraw->shader));
|
cfg_get_string("shader", "Shaders\\cubic\\catmull-rom-bilinear.glsl", g_ddraw->shader, sizeof(g_ddraw->shader));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue