Fixes and improvements (#616)
This commit is contained in:
committed by
GitHub
parent
f943c4dd69
commit
b03759a111
@@ -2,7 +2,8 @@
|
||||
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/file/PropertiesFile.h>
|
||||
#include <Tactility/DeprecatedPaths.h>
|
||||
|
||||
#include <app/paths.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
@@ -11,7 +12,11 @@
|
||||
namespace tt::settings::display {
|
||||
|
||||
static std::string getSettingsFilePath() {
|
||||
return getUserDataPath() + "/settings/display.properties";
|
||||
char path[256];
|
||||
if (app_paths_get_user_data_path("tactility.display", "display.properties", path, sizeof(path)) != ERROR_NONE) {
|
||||
return "";
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
constexpr auto* SETTINGS_KEY_ORIENTATION = "orientation";
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include <Tactility/settings/TrackballSettings.h>
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/file/PropertiesFile.h>
|
||||
#include <Tactility/DeprecatedPaths.h>
|
||||
|
||||
#include <app/paths.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
@@ -10,7 +11,11 @@
|
||||
namespace tt::settings::trackball {
|
||||
|
||||
static std::string getSettingsFilePath() {
|
||||
return getUserDataPath() + "/settings/trackball.properties";
|
||||
char path[256];
|
||||
if (app_paths_get_user_data_path("tactility.trackballsettings", "trackball.properties", path, sizeof(path)) != ERROR_NONE) {
|
||||
return "";
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
constexpr auto* KEY_TRACKBALL_ENABLED = "trackballEnabled";
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <Tactility/DeprecatedPaths.h>
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/file/PropertiesFile.h>
|
||||
#include <Tactility/settings/WebServerSettings.h>
|
||||
|
||||
#include <app/paths.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <charconv>
|
||||
@@ -22,7 +22,11 @@ namespace tt::settings::webserver {
|
||||
constexpr auto* TAG = "WebServerSettings";
|
||||
|
||||
static std::string getSettingsFilePath() {
|
||||
return getUserDataPath() + "/settings/webserver.properties";
|
||||
char path[256];
|
||||
if (app_paths_get_user_data_path("tactility.webserversettings", "webserver.properties", path, sizeof(path)) != ERROR_NONE) {
|
||||
return "";
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
// Property keys
|
||||
|
||||
Reference in New Issue
Block a user