Skip to content

Commit

Permalink
fix(win32): parse comma in dpiScale field (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcincichocki authored Jun 2, 2021
1 parent 991da13 commit 2e1e81c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/win32/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function parseDisplaysOutput (output) {
return output.slice(index + match.length)
.split('\n')
.map(s => s.replace(/[\n\r]/g, ''))
.map(s => s.match(/(.*?);(.?\d+);(.?\d+);(.?\d+);(.?\d+);(.?\d*\.?\d+)/))
.map(s => s.match(/(.*?);(.?\d+);(.?\d+);(.?\d+);(.?\d+);(.?\d*[\.,]?\d+)/))
.filter(s => s)
.map(m => ({
id: m[1],
Expand All @@ -59,7 +59,7 @@ function parseDisplaysOutput (output) {
right: +m[3],
bottom: +m[4],
left: +m[5],
dpiScale: +m[6]
dpiScale: +m[6].replace(',', '.')
}))
.map(d => Object.assign(d, {
height: d.bottom - d.top,
Expand Down

0 comments on commit 2e1e81c

Please sign in to comment.