sound: update global volume state in sound_set_volume()

Instead of calling sound_set_volume() and then manually
setting global_status.volume to match, update the global
volume state directly in sound_set_volume(). This makes
things a bit simpler and less error-prone.

Change-Id: I4db4d60ae1a72bd051ef49c90b1ae7f5ba59e535
This commit is contained in:
Aidan MacDonald 2025-10-01 18:01:35 +01:00 committed by Solomon Peachy
parent ae001cb60c
commit b19b95c00f
10 changed files with 7 additions and 18 deletions

View file

@ -2131,7 +2131,6 @@ enum plugin_status plugin_start(const void* parameter)
{
vol++;
rb->sound_set(SOUND_VOLUME, vol);
rb->global_status->volume = vol;
}
osc_popupmsg(OSC_MSG_VOLUME, vol);
@ -2147,7 +2146,6 @@ enum plugin_status plugin_start(const void* parameter)
{
vol--;
rb->sound_set(SOUND_VOLUME, vol);
rb->global_status->volume = vol;
}
osc_popupmsg(OSC_MSG_VOLUME, vol);