set: fix wrong save path / fixed null deref / more env refactor

This commit is contained in:
Hane 2025-01-07 18:53:17 +01:00
commit c87c8d0990
5 changed files with 117 additions and 119 deletions

View file

@ -9,9 +9,6 @@
class EndpointVolumeCallback;
class Session;
wchar_t* getExeAbsPath(uint32_t *exeAbsPathLength);
std::string getSettingsPath(SettingsTargetDirectory target, bool create);
// Convert a wide UTF16LE string to an UTF8 string
static inline std::string utf16ToUtf8(const wchar_t* wstr) {
if(!wstr || wstr[0] == '\0') return std::string();
@ -201,6 +198,8 @@ class EndpointNewSessionCallback : public IAudioSessionNotification {
};
namespace Environment {
wchar_t* getExeAbsPath(uint32_t *exeAbsPathLength);
std::string createSettingsPath(SettingsTargetDirectory target, bool create);
void populateSystemValues();
void openControlPanel();
ProcessedNativeEvent processTopLevelWindowMessage(void* msg);