Replace broken WIN32 checks with _WIN32

CMake defines WIN32 by default on Windows, but we shouldn't rely on it.
_WIN32 is defined by all compilers targeting Windows.

Also cleaned up some header includes.
This commit is contained in:
Johannes Kauffmann
2022-09-11 02:32:09 +02:00
committed by Kai Blaschke
parent 4cf04e6f66
commit 9c8e412cdb
12 changed files with 40 additions and 42 deletions

View File

@ -32,7 +32,7 @@
#include "fatal.h"
#include "projectM-opengl.h"
#ifdef WIN32
#ifdef _WIN32
#include "dirent.h"
#else
#include <dirent.h>
@ -136,7 +136,7 @@ void ProjectM::ReadConfig(const std::string& configurationFilename)
m_settings.presetPath = config.read<string>("Preset Path", "../Resources/presets");
#endif
#ifdef WIN32
#ifdef _WIN32
m_settings.presetPath = config.read<string>("Preset Path", "/usr/local/share/projectM/presets");
#endif