get proper path to "My Documents" folder in WIN32

This commit is contained in:
Andrzej Rybczak
2009-04-02 21:29:00 +02:00
parent 7f85a0dcd1
commit 519a36872a
4 changed files with 49 additions and 13 deletions

View File

@@ -21,18 +21,10 @@
#ifndef _NCMPCPP_H
#define _NCMPCPP_H
#include <cstdlib>
#include "window.h"
#include "menu.h"
#include "scrollpad.h"
#ifdef WIN32
# define HOME_ENV "USERPROFILE"
#else
# define HOME_ENV "HOME"
#endif // WIN32
#ifdef HAVE_PTHREAD_H
# include <pthread.h>
#else
@@ -47,9 +39,5 @@ typedef std::pair<std::string, std::string> string_pair;
const int ncmpcpp_window_timeout = 250;
const std::string home_path = getenv(HOME_ENV) ? getenv(HOME_ENV) : "";
#undef HOME_ENV
#endif