Ensure sizes passed to OBS are actual pixel sizes

This should fix GS rendering on surfaces on HiDPI displays; moving
windows between displays with differing pixel ratios currently requires
a manual resize
This commit is contained in:
Palana committed 2014-04-16 22:39:05 +02:00
1 parent 2fc810fd09
commit f447a44f9c
3 files changed
+10 -5

No files matched your search

+2 -2
View File
@@ -95,7 +95,7 @@ void OBSBasicProperties::timerEvent(QTimerEvent *event)
killTimer(resizeTimer);
resizeTimer = 0;
QSize size = ui->preview->size();
QSize size = GetPixelSize(ui->preview);
obs_display_resize(display, size.width(), size.height());
}
}
@@ -107,7 +107,7 @@ void OBSBasicProperties::Init()
show();
App()->processEvents();
QSize previewSize = ui->preview->size();
QSize previewSize = GetPixelSize(ui->preview);
init_data.cx = uint32_t(previewSize.width());
init_data.cy = uint32_t(previewSize.height());
init_data.format = GS_RGBA;