mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 08:15:45 -04:00
Support compiling for FreeBSD
This commit is contained in:
@ -889,7 +889,7 @@ void CommonHostInterface::SetUserDirectory()
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32)
|
||||
// On Windows, use My Documents\DuckStation.
|
||||
PWSTR documents_directory;
|
||||
if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Documents, 0, NULL, &documents_directory)))
|
||||
@ -902,7 +902,7 @@ void CommonHostInterface::SetUserDirectory()
|
||||
}
|
||||
CoTaskMemFree(documents_directory);
|
||||
}
|
||||
#elif __linux__
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
// On Linux, use .local/share/duckstation as a user directory by default.
|
||||
const char* xdg_data_home = getenv("XDG_DATA_HOME");
|
||||
if (xdg_data_home && xdg_data_home[0] == '/')
|
||||
@ -915,7 +915,7 @@ void CommonHostInterface::SetUserDirectory()
|
||||
if (home_path)
|
||||
m_user_directory = StringUtil::StdStringFromFormat("%s/.local/share/duckstation", home_path);
|
||||
}
|
||||
#elif __APPLE__
|
||||
#elif defined(__APPLE__)
|
||||
// On macOS, default to ~/Library/Application Support/DuckStation.
|
||||
const char* home_path = getenv("HOME");
|
||||
if (home_path)
|
||||
|
@ -5,11 +5,16 @@
|
||||
#include "core/controller.h"
|
||||
#include "core/host_interface.h"
|
||||
#include "core/system.h"
|
||||
#include <alloca.h>
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
Log_SetChannel(EvdevControllerInterface);
|
||||
|
||||
EvdevControllerInterface::EvdevControllerInterface() = default;
|
||||
|
Reference in New Issue
Block a user