Skip to content

Commit be69fd1

Browse files
committed
Refresh global processes list
1 parent 5a26f4e commit be69fd1

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.16)
22

3-
project(Earie VERSION 1.0.0 LANGUAGES CXX)
3+
project(Earie VERSION 1.0.1 LANGUAGES CXX)
44

55
set(TARGET_NAME Earie)
66

src/AudioBackend.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,11 @@ QVector<AudioBackend::DeviceSnapshot> AudioBackend::devicesSnapshotAll() const
405405
QVector<AudioBackend::ProcessSnapshot> AudioBackend::knownProcessesSnapshot() const
406406
{
407407
QHash<QString, QString> uniq;
408-
for (auto it = m_sessionByKeyByDevice.begin(); it != m_sessionByKeyByDevice.end(); ++it) {
409-
for (auto *s : it.value()) {
410-
if (!s)
411-
continue;
412-
const QString exe = s->exePath();
413-
if (exe.isEmpty())
408+
for (const auto &ds : m_lastSnapshot) {
409+
for (const auto &ss : ds.sessions) {
410+
if (ss.exePath.isEmpty())
414411
continue;
415-
uniq.insert(exe, s->displayName());
412+
uniq.insert(ss.exePath, ss.displayName);
416413
}
417414
}
418415
QVector<ProcessSnapshot> out;

0 commit comments

Comments
 (0)