mirror of
https://github.com/obsproject/obs-studio.git
synced 2025-12-28 07:55:01 +00:00
frontend: Round display size for projectors
Some checks are pending
Push / Format 🔍 (push) Waiting to run
Push / Build 🧱 (push) Waiting to run
Push / Validate Compatibility 🕵️ (push) Waiting to run
Push / Validate Services 🕵️ (push) Waiting to run
Push / Update Documentation 📖 (push) Waiting to run
Push / Deploy Documentation to Cloudflare ☁️ (push) Blocked by required conditions
Push / Create Sparkle Appcast 🎙️ (arm64) (push) Blocked by required conditions
Push / Create Sparkle Appcast 🎙️ (x86_64) (push) Blocked by required conditions
Push / merge-appcasts (push) Blocked by required conditions
Push / Windows Signing ✍️ (push) Blocked by required conditions
Push / Create Release 🛫 (push) Blocked by required conditions
Some checks are pending
Push / Format 🔍 (push) Waiting to run
Push / Build 🧱 (push) Waiting to run
Push / Validate Compatibility 🕵️ (push) Waiting to run
Push / Validate Services 🕵️ (push) Waiting to run
Push / Update Documentation 📖 (push) Waiting to run
Push / Deploy Documentation to Cloudflare ☁️ (push) Blocked by required conditions
Push / Create Sparkle Appcast 🎙️ (arm64) (push) Blocked by required conditions
Push / Create Sparkle Appcast 🎙️ (x86_64) (push) Blocked by required conditions
Push / merge-appcasts (push) Blocked by required conditions
Push / Windows Signing ✍️ (push) Blocked by required conditions
Push / Create Release 🛫 (push) Blocked by required conditions
This commit is contained in:
parent
ef9ec6fcc3
commit
c8e74c9dec
@ -105,7 +105,7 @@ QList<QString> OBSBasic::GetProjectorMenuMonitorsFormatted()
|
||||
for (int i = 0; i < screens.size(); i++) {
|
||||
QScreen *screen = screens[i];
|
||||
QRect screenGeometry = screen->geometry();
|
||||
qreal ratio = screen->devicePixelRatio();
|
||||
qreal screenPixelRatio = screen->devicePixelRatio();
|
||||
QString name = "";
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
name = screen->name();
|
||||
@ -120,9 +120,12 @@ QList<QString> OBSBasic::GetProjectorMenuMonitorsFormatted()
|
||||
if (name.length() == 0) {
|
||||
name = QString("%1 %2").arg(QTStr("Display")).arg(QString::number(i + 1));
|
||||
}
|
||||
|
||||
int screenPixelWidth = std::round((screenGeometry.width() * screenPixelRatio) * 0.5f) * 2;
|
||||
int screenPixelHeight = std::round((screenGeometry.height() * screenPixelRatio) * 0.5f) * 2;
|
||||
|
||||
QString str = QString("%1: %2x%3 @ %4,%5")
|
||||
.arg(name, QString::number(screenGeometry.width() * ratio),
|
||||
QString::number(screenGeometry.height() * ratio),
|
||||
.arg(name, QString::number(screenPixelWidth), QString::number(screenPixelHeight),
|
||||
QString::number(screenGeometry.x()), QString::number(screenGeometry.y()));
|
||||
projectorsFormatted.push_back(str);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user