dpi awareness support

dev support in debug mode (reverse-merged from commit 058a0c0a24f197f699ffa606b624262f980722c4)