| 1 | // Copyright 2018 Dolphin Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | |
| 4 | #include "DolphinQt/Config/Mapping/GCMicrophone.h" |
| 5 | |
| 6 | #include <QFormLayout> |
| 7 | #include <QGroupBox> |
| 8 | #include <QHBoxLayout> |
| 9 | #include <QVBoxLayout> |
| 10 | |
| 11 | #include "InputCommon/InputConfig.h" |
| 12 | |
| 13 | #include "Core/HW/GCPad.h" |
| 14 | #include "Core/HW/GCPadEmu.h" |
| 15 | |
| 16 | GCMicrophone::GCMicrophone(MappingWindow* window) : MappingWidget(window) |
| 17 | { |
| 18 | CreateMainLayout(); |
| 19 | } |
| 20 | |
| 21 | void GCMicrophone::CreateMainLayout() |
| 22 | { |
| 23 | m_main_layout = new QHBoxLayout(); |
| 24 | |
| 25 | m_main_layout->addWidget( |
| 26 | CreateGroupBox(tr("Microphone"), Pad::GetGroup(GetPort(), PadGroup::Mic))); |
| 27 | |
| 28 | setLayout(m_main_layout); |
| 29 | } |
| 30 | |
| 31 | void GCMicrophone::LoadSettings() |
| 32 | { |
| 33 | Pad::LoadConfig(); |
| 34 | } |
| 35 | |
| 36 | void GCMicrophone::SaveSettings() |
| 37 | { |
| 38 | Pad::GetConfig()->SaveConfig(); |
| 39 | } |
| 40 | |
| 41 | InputConfig* GCMicrophone::GetConfig() |
| 42 | { |
| 43 | return Pad::GetConfig(); |
| 44 | } |