mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-27 07:38:40 -05:00
Resize preview when OBS windows are moved between monitors
This should fix the previews in most cases when moving between monitors with differing pixel ratios
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include <QScreen>
|
||||
#include <QWindow>
|
||||
|
||||
using namespace std;
|
||||
|
||||
Q_DECLARE_METATYPE(OBSScene);
|
||||
@@ -53,6 +56,13 @@ OBSBasic::OBSBasic(QWidget *parent)
|
||||
ui (new Ui::OBSBasic)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(windowHandle(), &QWindow::screenChanged, [this]() {
|
||||
struct obs_video_info ovi;
|
||||
|
||||
if (obs_get_video_info(&ovi))
|
||||
ResizePreview(ovi.base_width, ovi.base_height);
|
||||
});
|
||||
}
|
||||
|
||||
static inline bool HasAudioDevices(const char *source_id)
|
||||
|
||||
Reference in New Issue
Block a user