From d53109eaa890ab807b66961a89291cea3cd3c003 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 18 Aug 2020 23:58:16 +0200 Subject: first part of a proper lutris implementation and cleanup - remove all old build platform related variables - change behavior of clean - change tabs into spaces - make XDG fetching method static - replace strcpy and cat with strn alternative with proper bounds checking - add cache dir - reenable dxvk and download from ram - completely rework lutris fetching and convert it into an interal struct - only show http errors in debug - add sanity checks to methods with possible NULL return - change extracting methods to extract tar from ram --- src/main.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index aa4f356..a10e00c 100644 --- a/src/main.c +++ b/src/main.c @@ -11,7 +11,7 @@ const static struct Command main_commands[] = { { .name = "wine", .func = wine, .description = "manage wine versions" }, - //{ .name = "dxvk", .func = dxvk, .description = "manage dxvk versions (TODO)" }, + { .name = "dxvk", .func = dxvk, .description = "manage dxvk versions" }, { .name = "lutris", .func = lutris, .description = "run lutris instraller"}, { .name = "info", .func = main_info, .description = "show some information about polecat" }, }; @@ -32,19 +32,20 @@ int main(int argc, char** argv) int main_info(int argc, char** argv) { - char cfgdir[PATH_MAX]; - char datadir[PATH_MAX]; + char cfgdir[PATH_MAX], datadir[PATH_MAX], cachedir[PATH_MAX]; - getConfigDir(cfgdir); - getDataDir(datadir); + getConfigDir(cfgdir, sizeof(cfgdir)); + getDataDir(datadir, sizeof(datadir)); + getCacheDir(cachedir, sizeof(cachedir)); printf("version:\t\t%s\n" "user-Agent:\t\t%s/%s\n" "config dir\t\t%s\n" - "data dir\t\t%s\n", + "data dir\t\t%s\n" + "cache dir\t\t%s\n", VERSION, NAME, VERSION, - cfgdir, datadir); + cfgdir, datadir, cachedir); return 0; } -- cgit v1.2.3