diff options
| author | untodesu <kirill@untode.su> | 2025-05-27 16:35:41 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-05-27 16:35:41 +0500 |
| commit | adbbe24b0941c369d52461418cef206fc895168e (patch) | |
| tree | 349141c1e81f1d1113d8bbd96525ff2cf37d691b /game/client/sound.cc | |
| parent | 29da2327c990ef0ad4347b0067f4556030bbb3dc (diff) | |
| download | voxelius-adbbe24b0941c369d52461418cef206fc895168e.tar.bz2 voxelius-adbbe24b0941c369d52461418cef206fc895168e.zip | |
GUI updates
- Update ImGui to latest release (v1.91.9b)
- Fixup splash using a deprecated ImGui function
- Hide some settings tabs when not available
- Fix sound config values getting trashed whenever sound system cannot
be initialized
Diffstat (limited to 'game/client/sound.cc')
| -rw-r--r-- | game/client/sound.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/game/client/sound.cc b/game/client/sound.cc index fc48002..2512a04 100644 --- a/game/client/sound.cc +++ b/game/client/sound.cc @@ -30,7 +30,7 @@ static resource_ptr<SoundEffect> sfx_generic; static resource_ptr<SoundEffect> sfx_player; static resource_ptr<SoundEffect> sfx_ui; -void sound::init(void) +void sound::init_config(void) { globals::client_config.add_value("sound.volume_master", sound::volume_master); globals::client_config.add_value("sound.volume_effects", sound::volume_effects); @@ -42,7 +42,10 @@ void sound::init(void) settings::add_slider(0, sound::volume_effects, settings_location::SOUND_LEVELS, "sound.volume_effects", false, "%.0f%%"); settings::add_slider(1, sound::volume_music, settings_location::SOUND_LEVELS, "sound.volume_music", false, "%.0f%%"); settings::add_slider(2, sound::volume_ui, settings_location::SOUND_LEVELS, "sound.volume_ui", false, "%.0f%%"); +} +void sound::init(void) +{ alGenSources(1, &generic_source); alSourcei(generic_source, AL_SOURCE_RELATIVE, AL_TRUE); alSource3f(generic_source, AL_POSITION, 0.0f, 0.0f, 0.0f); |
