mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-07-18 00:07:09 +00:00
Null volume hotfix
This commit is contained in:
parent
785bd05d71
commit
188300c45c
|
|
@ -232,16 +232,16 @@ const SettingsView = memo(function SettingsView() {
|
|||
} else if (currentSubMenu === "audio") {
|
||||
items.push({
|
||||
id: "music",
|
||||
label: `Music: ${musicVolume}%`,
|
||||
label: `Music: ${musicVolume ?? 50}%`,
|
||||
type: "slider",
|
||||
value: musicVolume,
|
||||
value: musicVolume ?? 50,
|
||||
onChange: setMusicVolume,
|
||||
});
|
||||
items.push({
|
||||
id: "sfx",
|
||||
label: `SFX: ${sfxVolume}%`,
|
||||
label: `SFX: ${sfxVolume ?? 100}%`,
|
||||
type: "slider",
|
||||
value: sfxVolume,
|
||||
value: sfxVolume ?? 100,
|
||||
onChange: setSfxVolume,
|
||||
});
|
||||
items.push({
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ export function useAppConfig() {
|
|||
if (config.vfxEnabled !== undefined) setVfxEnabled(config.vfxEnabled);
|
||||
if (config.animationsEnabled !== undefined) setAnimationsEnabled(config.animationsEnabled);
|
||||
if (config.rpcEnabled !== undefined) setRpcEnabled(config.rpcEnabled);
|
||||
if (config.musicVol !== undefined) setMusicVol(config.musicVol);
|
||||
if (config.sfxVol !== undefined) setSfxVol(config.sfxVol);
|
||||
if (config.musicVol !== undefined && config.musicVol !== null) setMusicVol(config.musicVol);
|
||||
if (config.sfxVol !== undefined && config.sfxVol !== null) setSfxVol(config.sfxVol);
|
||||
if (config.legacyMode !== undefined) setLegacyMode(config.legacyMode);
|
||||
setIsLoaded(true);
|
||||
});
|
||||
|
|
@ -83,9 +83,9 @@ export function useAppConfig() {
|
|||
setAnimationsEnabled,
|
||||
rpcEnabled,
|
||||
setRpcEnabled,
|
||||
musicVol,
|
||||
musicVol: musicVol ?? 50,
|
||||
setMusicVol,
|
||||
sfxVol,
|
||||
sfxVol: sfxVol ?? 100,
|
||||
setSfxVol,
|
||||
isDayTime,
|
||||
setIsDayTime,
|
||||
|
|
|
|||
Loading…
Reference in a new issue