0x004C043D
| 1155 | |
| 1156 | // 0x004C043D |
| 1157 | static void audioDeviceMouseDown(const Window& self) |
| 1158 | { |
| 1159 | const auto& devices = Audio::getDevices(); |
| 1160 | if (devices.size() != 0) |
| 1161 | { |
| 1162 | auto& dropdown = self.widgets[Widx::audio_device]; |
| 1163 | Dropdown::show(self.x + dropdown.left, self.y + dropdown.top, dropdown.width() - 4, dropdown.height(), self.getColour(WindowColour::secondary), devices.size(), 0x80); |
| 1164 | for (size_t i = 0; i < devices.size(); i++) |
| 1165 | { |
| 1166 | auto name = devices[i].c_str(); |
| 1167 | Dropdown::add(i, StringIds::dropdown_stringid, { StringIds::stringptr, name }); |
| 1168 | } |
| 1169 | |
| 1170 | auto currentDevice = Audio::getCurrentDevice(); |
| 1171 | if (currentDevice != std::numeric_limits<size_t>().max()) |
| 1172 | { |
| 1173 | Dropdown::setItemSelected((int16_t)currentDevice); |
| 1174 | } |
| 1175 | } |
| 1176 | } |
| 1177 | |
| 1178 | // 0x004C04CA |
| 1179 | static void audioDeviceDropdown(const Window& self, int16_t itemIndex) |
no test coverage detected