mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-06 07:37:21 +02:00
Get the gpu index for both get and set (thanks @rezzafr33!)
This commit is contained in:
parent
c1d06f2ad5
commit
1482a2b39e
@ -397,13 +397,11 @@ int main(int argc, char *argv[])
|
||||
info.device = get_device(argv[1]);
|
||||
info.vendor = gamemode_get_gpu_vendor(info.device);
|
||||
|
||||
/* Adjust the device number to the gpu index for Nvidia */
|
||||
if (info.vendor == Vendor_NVIDIA)
|
||||
info.device = get_gpu_index_id_nv(&info);
|
||||
|
||||
/* Fetch the state and print it out */
|
||||
switch (info.vendor) {
|
||||
case Vendor_NVIDIA:
|
||||
/* Adjust the device number to the gpu index for Nvidia */
|
||||
info.device = get_gpu_index_id_nv(&info);
|
||||
|
||||
if (get_gpu_state_nv(&info) != 0)
|
||||
exit(EXIT_FAILURE);
|
||||
@ -436,6 +434,9 @@ int main(int argc, char *argv[])
|
||||
info.nv_core = get_generic_value(argv[3]);
|
||||
info.nv_mem = get_generic_value(argv[4]);
|
||||
|
||||
/* Adjust the device number to the gpu index for Nvidia */
|
||||
info.device = get_gpu_index_id_nv(&info);
|
||||
|
||||
/* Optional */
|
||||
info.nv_powermizer_mode = -1;
|
||||
if (argc >= 6)
|
||||
|
Loading…
x
Reference in New Issue
Block a user