mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Config: Make values atomic
This commit is contained in:
parent
82d5468b73
commit
8fbcbad9ec
35
src/Config.h
35
src/Config.h
@ -19,30 +19,27 @@ with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <QString>
|
||||
#include <util/config-file.h>
|
||||
|
||||
#include "plugin-macros.generated.h"
|
||||
|
||||
class Config {
|
||||
public:
|
||||
Config();
|
||||
void Load();
|
||||
void Save();
|
||||
void SetDefaultsToGlobalStore();
|
||||
config_t* GetConfigStore();
|
||||
struct Config {
|
||||
Config();
|
||||
void Load();
|
||||
void Save();
|
||||
void SetDefaultsToGlobalStore();
|
||||
config_t* GetConfigStore();
|
||||
|
||||
bool PortOverridden;
|
||||
bool PasswordOverridden;
|
||||
|
||||
bool FirstLoad;
|
||||
bool ServerEnabled;
|
||||
uint16_t ServerPort;
|
||||
std::atomic<bool> DebugEnabled;
|
||||
bool AlertsEnabled;
|
||||
bool AuthRequired;
|
||||
QString ServerPassword;
|
||||
|
||||
private:
|
||||
std::atomic<bool> PortOverridden;
|
||||
std::atomic<bool> PasswordOverridden;
|
||||
|
||||
std::atomic<bool> FirstLoad;
|
||||
std::atomic<bool> ServerEnabled;
|
||||
std::atomic<uint16_t> ServerPort;
|
||||
std::atomic<bool> DebugEnabled;
|
||||
std::atomic<bool> AlertsEnabled;
|
||||
std::atomic<bool> AuthRequired;
|
||||
QString ServerPassword;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user