MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getCurrentDeviceName

Function getCurrentDeviceName

src/OpenLoco/src/Audio/Audio.cpp:275–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273 }
274
275 const char* getCurrentDeviceName()
276 {
277 auto index = getCurrentDevice();
278 if (index == 0)
279 {
280#ifdef __HAS_DEFAULT_DEVICE__
281 return getDefaultDeviceName();
282#else
283 if (!_devices.empty())
284 {
285 return _devices[0].c_str();
286 }
287#endif
288 }
289
290 const auto& cfg = Config::get();
291 return cfg.audio.device.c_str();
292 }
293
294 size_t getCurrentDevice()
295 {

Callers 1

prepareDrawFunction · 0.85

Calls 4

getCurrentDeviceFunction · 0.85
getDefaultDeviceNameFunction · 0.85
getFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected