Signed-off-by: NaitLee <naitlee@disroot.org>
// windows wchar helpers
#ifdef WIN32
-# define MAX_OSWPATH (MAX_OSPATH * sizeof(wchar))
+# define MAX_OSWPATH MAX_OSPATH
# define WPATHDEF(var) wchar var[MAX_OSWPATH]
#else
# define WPATHDEF(var) ;
#else
// use the working directory
#ifdef WIN32
- _wgetcwd(fs_basedirw, sizeof(fs_basedirw));
+ GetCurrentDirectoryW(sizeof(fs_basedirw), fs_basedirw);
NARROW(fs_basedirw, fs_basedir);
#else
getcwd(fs_basedir, sizeof(fs_basedir));