mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-07-28 11:48:39 +00:00
update:全屏状态禁止电脑锁屏(qt未提供跨平台方案,目前仅windows,可参考sdl找到跨平台方案)
This commit is contained in:
parent
37bd19acf4
commit
5ba3e98b07
1 changed files with 8 additions and 0 deletions
|
@ -233,10 +233,18 @@ void VideoForm::switchFullScreen()
|
||||||
showNormal();
|
showNormal();
|
||||||
updateStyleSheet(height() > width());
|
updateStyleSheet(height() > width());
|
||||||
showToolFrom(true);
|
showToolFrom(true);
|
||||||
|
#ifdef Q_OS_WIN32
|
||||||
|
::SetThreadExecutionState(ES_CONTINUOUS);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
showToolFrom(false);
|
showToolFrom(false);
|
||||||
layout()->setContentsMargins(0, 0, 0, 0);
|
layout()->setContentsMargins(0, 0, 0, 0);
|
||||||
showFullScreen();
|
showFullScreen();
|
||||||
|
|
||||||
|
// 全屏状态禁止电脑休眠、息屏
|
||||||
|
#ifdef Q_OS_WIN32
|
||||||
|
::SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue