diff --git a/src/main.cpp b/src/main.cpp index 112a6ac..57bd9bf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1906,6 +1906,7 @@ int main(int argc, char **argv) { { "-gopm", Arg { {}, true, false } }, // deprecated, used keyint instead { "-keyint", Arg { {}, true, false } }, { "-encoder", Arg { {}, true, false } }, + { "-device", Arg { {}, true, false } }, }; for(int i = 1; i < argc; i += 2) { @@ -2226,6 +2227,10 @@ int main(int argc, char **argv) { overclock = false; } + const char *dri_device = args["-device"].value(); + if (dri_device) + egl.dri_card_path = dri_device; + egl.card_path[0] = '\0'; if(wayland || egl.gpu_info.vendor != GSR_GPU_VENDOR_NVIDIA) { // TODO: Allow specifying another card, and in other places