aboutsummaryrefslogtreecommitdiff
path: root/src/dxvk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dxvk.c')
-rw-r--r--src/dxvk.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/dxvk.c b/src/dxvk.c
index 2cd71b0..bca742e 100644
--- a/src/dxvk.c
+++ b/src/dxvk.c
@@ -84,6 +84,38 @@ COMMAND(dxvk, download)
COMMAND(dxvk, remove)
{
+ if (argc == 2)
+ {
+ char* dxvkver = argv[1];
+
+ char dxvkpath[PATH_MAX];
+ getDXVKDir(dxvkpath, sizeof(dxvkpath));
+
+ strncat(dxvkpath, "/", sizeof(dxvkpath) - strlen(dxvkpath) - 1);
+ strncat(dxvkpath, dxvkver, sizeof(dxvkpath) - strlen(dxvkpath) - 1);
+
+
+ if (!isDir(dxvkpath))
+ {
+ fprintf(stderr, "`%s' is not an downloaded DXVK version\n", dxvkver);
+ return 0;
+ }
+
+ int retval = removeDir(dxvkpath);
+ if (!retval)
+ {
+ fprintf(stderr, "Done\n");
+ }
+ else
+ {
+ fprintf(stderr, "Something might have gone wrong. Manual cleanup might be required\n");
+ }
+
+ return retval;
+ }
+
+ fprintf(stderr, USAGE_STR " dxvk remove <version>\n\nInstalled dxvk versions can be obtained by using `" NAME " dxvk list-installed\n");
+
return 0;
}