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