summaryrefslogtreecommitdiff
path: root/src/port
diff options
context:
space:
mode:
authormkoterski <matthiaskoterski@gmail.com>2026-04-21 13:33:11 +0200
committerGitHub <noreply@github.com>2026-04-21 13:33:11 +0200
commitd2febf46035d4da32e969b577102ec6bcd4d5c12 (patch)
tree26797500712f740b4cf514c4c426cde1d6258723 /src/port
parent90f0e3a199f2f69d0857b15bba64926d7991b557 (diff)
Add CoreAudio to audio backend combobox map (#686)
macOS uses COREAUDIO as the default audio backend, but the combobox display map in MenuTypes.h only contained SDL and WASAPI. This causes an unordered_map::at crash on first frame draw when the Audio API dropdown tries to render. Fixes the menu crash portion of #681.
Diffstat (limited to 'src/port')
-rw-r--r--src/port/ui/MenuTypes.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/port/ui/MenuTypes.h b/src/port/ui/MenuTypes.h
index 653c6955d..e86550055 100644
--- a/src/port/ui/MenuTypes.h
+++ b/src/port/ui/MenuTypes.h
@@ -257,6 +257,7 @@ struct MainMenuEntry {
static const std::unordered_map<Ship::AudioBackend, const char*> audioBackendsMap = {
{ Ship::AudioBackend::WASAPI, "Windows Audio Session API" },
{ Ship::AudioBackend::SDL, "SDL" },
+ { Ship::AudioBackend::COREAUDIO, "CoreAudio" },
};
static const std::unordered_map<Ship::WindowBackend, const char*> windowBackendsMap = {