mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-07 08:07:20 +02:00
Hand down correct set parameters to gpucorectl
This commit is contained in:
parent
8ea751057c
commit
b85edc2e04
@ -177,10 +177,25 @@ int game_mode_apply_gpu(const GameModeGPUInfo *info, bool apply)
|
|||||||
info->core,
|
info->core,
|
||||||
info->mem);
|
info->mem);
|
||||||
|
|
||||||
|
/* Generate the input strings */
|
||||||
|
char vendor[7];
|
||||||
|
snprintf(vendor, 7, "0x%04x", (short)info->vendor);
|
||||||
|
char device[4];
|
||||||
|
snprintf(device, 4, "%ld", info->device);
|
||||||
|
char core[8];
|
||||||
|
snprintf(core, 8, "%ld", info->core);
|
||||||
|
char mem[8];
|
||||||
|
snprintf(mem, 8, "%ld", info->mem);
|
||||||
|
|
||||||
// TODO: Actually pass right arguments
|
// TODO: Actually pass right arguments
|
||||||
const char *const exec_args[] = {
|
const char *const exec_args[] = {
|
||||||
"/usr/bin/pkexec",
|
"/usr/bin/pkexec",
|
||||||
LIBEXECDIR "/gpuclockctl",
|
LIBEXECDIR "/gpuclockctl",
|
||||||
|
vendor,
|
||||||
|
device,
|
||||||
|
"set",
|
||||||
|
apply ? core : "0", /* For now simply reset to zero */
|
||||||
|
apply ? mem : "0", /* could in the future store default values for reset */
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user