Fix scrcpy
This commit is contained in:
parent
cf543917b4
commit
675fa7ca5f
@ -43,16 +43,16 @@ void ScrcpyWindow::startScrcpy() {
|
|||||||
qDebug() << "windowWidth:" << windowWidth;
|
qDebug() << "windowWidth:" << windowWidth;
|
||||||
qDebug() << "windowHeight:" << windowHeight;
|
qDebug() << "windowHeight:" << windowHeight;
|
||||||
// Устанавливаем размер вашего окна
|
// Устанавливаем размер вашего окна
|
||||||
setFixedSize(windowWidth + 200, windowHeight);
|
setFixedSize(windowWidth + 100, windowHeight);
|
||||||
// setWindowFlags(windowFlags() | Qt::MSWindowsFixedSizeDialogHint);
|
// setWindowFlags(windowFlags() | Qt::MSWindowsFixedSizeDialogHint);
|
||||||
|
|
||||||
// QString("--window-width=%1").arg(windowWidth), QString("--window-height=%1").arg(windowHeight)
|
// QString("--window-width=%1").arg(windowWidth), QString("--window-height=%1").arg(windowHeight)
|
||||||
// m_process = new QProcess(this);
|
m_process = new QProcess(this);
|
||||||
// m_process->start("scrcpy", { "--window-title", "scrcpy", "--always-on-top"});
|
m_process->start("scrcpy", { "--window-title", "scrcpy", "--always-on-top"});
|
||||||
|
|
||||||
// Подождём немного, чтобы окно scrcpy запустилось
|
// Подождём немного, чтобы окно scrcpy запустилось
|
||||||
// QTimer::singleShot(2000, this, &ScrcpyWindow::);
|
// QTimer::singleShot(2000, this, &ScrcpyWindow::);
|
||||||
// embedPlatformSpecific();
|
embedPlatformSpecific();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrcpyWindow::stopScrcpy() {
|
void ScrcpyWindow::stopScrcpy() {
|
||||||
@ -164,7 +164,7 @@ void ScrcpyWindow::embedPlatformSpecific() {
|
|||||||
// RECT rect;
|
// RECT rect;
|
||||||
// GetClientRect(hwndTarget, &rect);
|
// GetClientRect(hwndTarget, &rect);
|
||||||
SetWindowPos(hwndScrcpy, HWND_TOP, 0, 0,
|
SetWindowPos(hwndScrcpy, HWND_TOP, 0, 0,
|
||||||
rect.right - rect.left, rect.bottom - rect.top,
|
rect.right - rect.left - 200, rect.bottom - rect.top,
|
||||||
SWP_SHOWWINDOW | SWP_FRAMECHANGED);
|
SWP_SHOWWINDOW | SWP_FRAMECHANGED);
|
||||||
|
|
||||||
// rect.right - rect.left, rect.bottom - rect.top,
|
// rect.right - rect.left, rect.bottom - rect.top,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user