aboutsummaryrefslogtreecommitdiff
path: root/src/dxvk.c
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2020-08-10 12:43:26 +0200
committerJan200101 <sentrycraft123@gmail.com>2020-08-10 12:43:26 +0200
commit1753e2b151cbb4af75a4e9ea61720b3704b03805 (patch)
tree6265e9829a6d6b76ddae13de2138ef8f1c657ccd /src/dxvk.c
parentc11dd0eae09df4982459a34d764910d0501f2ae2 (diff)
downloadpolecat-1753e2b151cbb4af75a4e9ea61720b3704b03805.tar.gz
polecat-1753e2b151cbb4af75a4e9ea61720b3704b03805.zip
a lot of changes […]0.1.3
- go to next entry of argv and decrement argc the deeper it goes - add basic lutris functionality - remove "help" from help message and as a command - replace all stderr prints with stdout prints (usually stderr is better for directly informing the user but in this case I don't think it will help much) - add libarchive dependency to the README - bump version number
Diffstat (limited to 'src/dxvk.c')
-rw-r--r--src/dxvk.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/dxvk.c b/src/dxvk.c
index f0ebc86..c5ac1d0 100644
--- a/src/dxvk.c
+++ b/src/dxvk.c
@@ -10,16 +10,15 @@
const static struct Command dxvk_commands[] = {
{ .name = "install", .func = dxvk_install, .description = "download and install a dxvk version" },
{ .name = "list", .func = dxvk_list, .description = "list available dxvk versions" },
- { .name = "help", .func = dxvk_help, .description = "shows this message" },
};
int dxvk(int argc, char** argv)
{
- if (argc > 2)
+ if (argc > 1)
{
for (int i = 0; i < ARRAY_LEN(dxvk_commands); ++i)
{
- if (!strcmp(dxvk_commands[i].name, argv[2])) return dxvk_commands[i].func(argc, argv);
+ if (!strcmp(dxvk_commands[i].name, argv[1])) return dxvk_commands[i].func(argc-1, argv+1);
}
}
@@ -29,14 +28,14 @@ int dxvk(int argc, char** argv)
int dxvk_install(int argc, char** argv)
{
- if (argc == 4)
+ if (argc == 2)
{
struct json_object* runner = fetchJSON(DXVK_API);
if (runner)
{
- int choice = atoi(argv[3]);
+ int choice = atoi(argv[1]);
if (choice > json_object_array_length(runner) - 1 || choice < 0)
{