mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 06:11:07 -04:00
Add filesystem header to select between std::filesystem and std::experimental::filesystem depending on system availability.
Commit amended by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
@@ -2,17 +2,15 @@
|
||||
#include "ResourceManager.h"
|
||||
#include "RGBController_Dummy.h"
|
||||
#include "LogManager.h"
|
||||
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
|
||||
#include <experimental/filesystem>
|
||||
#include "filesystem.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
|
||||
#define OPENRGB_PROFILE_HEADER "OPENRGB_PROFILE"
|
||||
#define OPENRGB_PROFILE_VERSION OPENRGB_SDK_PROTOCOL_VERSION
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
|
||||
ProfileManager::ProfileManager(std::string config_dir)
|
||||
{
|
||||
configuration_directory = config_dir;
|
||||
@@ -389,7 +387,7 @@ void ProfileManager::UpdateProfileList()
|
||||
/*---------------------------------------------------------*\
|
||||
| Load profiles by looking for .orp files in current dir |
|
||||
\*---------------------------------------------------------*/
|
||||
for(const auto & entry : fs::directory_iterator(configuration_directory))
|
||||
for(const auto & entry : filesystem::directory_iterator(configuration_directory))
|
||||
{
|
||||
std::string filename = entry.path().filename().string();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user