mirror of
https://github.com/Zaarrg/stremio-community-v5.git
synced 2026-04-21 17:11:55 +00:00
Fix Initial volume always being 50
- Fixed current volume not being save to settings.ini causing initial volume to always be 50. [Issue: https://github.com/Zaarrg/stremio-desktop-v5/issues/42]
This commit is contained in:
parent
b159fd01e8
commit
33dc1e942f
3 changed files with 6 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ void SaveSettings()
|
||||||
WritePrivateProfileStringW(L"General", L"PauseOnMinimize", pauseMinVal, iniPath.c_str());
|
WritePrivateProfileStringW(L"General", L"PauseOnMinimize", pauseMinVal, iniPath.c_str());
|
||||||
WritePrivateProfileStringW(L"General", L"PauseOnLostFocus", pauseFocVal, iniPath.c_str());
|
WritePrivateProfileStringW(L"General", L"PauseOnLostFocus", pauseFocVal, iniPath.c_str());
|
||||||
WritePrivateProfileStringW(L"General", L"AllowZoom", allowZoomVal, iniPath.c_str());
|
WritePrivateProfileStringW(L"General", L"AllowZoom", allowZoomVal, iniPath.c_str());
|
||||||
|
WriteIntToIni(L"MPV", L"InitialVolume", g_currentVolume, iniPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteIntToIni(const std::wstring §ion, const std::wstring &key, int value, const std::wstring &iniPath)
|
static void WriteIntToIni(const std::wstring §ion, const std::wstring &key, int value, const std::wstring &iniPath)
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,5 @@ void LoadSettings();
|
||||||
void SaveSettings();
|
void SaveSettings();
|
||||||
void SaveWindowPlacement(const WINDOWPLACEMENT &wp);
|
void SaveWindowPlacement(const WINDOWPLACEMENT &wp);
|
||||||
bool LoadWindowPlacement(WINDOWPLACEMENT &wp);
|
bool LoadWindowPlacement(WINDOWPLACEMENT &wp);
|
||||||
|
static void WriteIntToIni(const std::wstring §ion, const std::wstring &key, int value, const std::wstring &iniPath);
|
||||||
#endif // CONFIG_H
|
#endif // CONFIG_H
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
#include <gdiplus.h>
|
#include <gdiplus.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
static std::wstring GetDailyCrashLogPath()
|
static std::wstring GetDailyCrashLogPath()
|
||||||
{
|
{
|
||||||
std::time_t t = std::time(nullptr);
|
std::time_t t = std::time(nullptr);
|
||||||
|
|
@ -49,6 +51,8 @@ void AppendToCrashLog(const std::string& message)
|
||||||
|
|
||||||
void Cleanup()
|
void Cleanup()
|
||||||
{
|
{
|
||||||
|
//Save Settings
|
||||||
|
SaveSettings();
|
||||||
// Shut down mpv
|
// Shut down mpv
|
||||||
CleanupMPV();
|
CleanupMPV();
|
||||||
// Shut down Node
|
// Shut down Node
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue