Skip to content

Commit

Permalink
InputEventsDevice.cpp - toggle system audio on
Browse files Browse the repository at this point in the history
  • Loading branch information
August2111 committed Mar 22, 2024
1 parent 67cc674 commit d15149c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Input/InputEventsDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@

#include "InputEvents.hpp"
#include "Dialogs/Device/DeviceListDialog.hpp"
#include "Dialogs/Message.hpp"
#include "Device/MultipleDevices.hpp"
#include "Device/Descriptor.hpp"
#include "Operation/PopupOperationEnvironment.hpp"
#include "Components.hpp"
#include "BackendComponents.hpp"

#include "Interface.hpp"

#include <cassert>

// SendNMEA
Expand Down Expand Up @@ -65,9 +68,15 @@ InputEvents::eventAudio(const TCHAR *misc)
{
assert(misc != NULL);

auto &audio_enabled = CommonInterface::SetUISettings().sound.vario.enabled;
if (ShowMessageBox(audio_enabled ?_T("System Audio -> Off"): _T("System Audio -> ON"),
_T("Audio"), MB_YESNO | MB_ICONQUESTION) == IDYES) {
audio_enabled = !audio_enabled;
// CommonInterface::SetUISettings().sound.vario.enabled =
// !CommonInterface::SetUISettings().sound.vario.enabled;
}

if (StringIsEqual(misc, _T("+"))) {
} else if (StringIsEqual(misc, _T("-"))) {
}
// ShowDeviceList(*backend_components->device_blackboard,
// backend_components->devices.get());
}

0 comments on commit d15149c

Please sign in to comment.