obs-studio/UI/context-bar-controls-devices.hpp
jp9000 fcf01304d2 UI: Defer device properties to separate thread
Because devices can take significant time to enumerate, defer the
properties creation to a separate thread.  The author of this commit
feels a great amount of displeasure over having to write this.
2020-08-25 08:21:29 -07:00

26 lines
375 B
C++

#pragma once
#include <obs.hpp>
#include <string>
#include <QThread>
class DeviceToolbarPropertiesThread : public QThread {
Q_OBJECT
OBSSource source;
obs_properties_t *props;
void run() override;
public:
inline DeviceToolbarPropertiesThread(OBSSource source_)
: source(source_)
{
}
~DeviceToolbarPropertiesThread() override;
public slots:
void Ready();
};