Merge pull request #254 from dar-irl/master

Support screen resolution on Windows 10
This commit is contained in:
Dylan Araps 2016-05-17 08:54:35 +10:00
commit cd41355a9d
1 changed files with 4 additions and 4 deletions

View File

@ -1543,12 +1543,12 @@ getresolution () {
;; ;;
"Windows") "Windows")
width=$(wmic desktopmonitor get screenwidth /value 2>/dev/null) width=$(wmic path Win32_VideoController get CurrentHorizontalResolution /value 2>/dev/null)
width=${width/ScreenWidth'='/} width=${width/CurrentHorizontalResolution'='/}
width=${width//[[:space:]]} width=${width//[[:space:]]}
height=$(wmic desktopmonitor get screenheight /value 2>/dev/null) height=$(wmic path Win32_VideoController get CurrentVerticalResolution /value 2>/dev/null)
height=${height/ScreenHeight'='/} height=${height/CurrentVerticalResolution'='/}
height=${height//[[:space:]]} height=${height//[[:space:]]}
[ ! -z "$width" ] && \ [ ! -z "$width" ] && \