🔧 Don't set scale on non-Windows

This commit is contained in:
Felix Rieseberg 2018-08-23 16:16:40 -07:00
parent 334a52b238
commit 8b3117689e
2 changed files with 7 additions and 5 deletions

View file

@ -1,3 +1,3 @@
⚠️ Thank you for reporting an issue!
Before we go any further, understand that I probably won't fullfil feature requests. I will however _gladly_ help you make a pull request if you're willing to play with Javascript!
Before we go any further, understand that I probably won't fullfil feature requests. I will however _gladly_ help you make a pull request if you're willing to play with Javascript!

View file

@ -35,10 +35,12 @@ async function main (id) {
// New v86 instance
window.emulator = new V86Starter(opts)
//high-dpi support
var scale = window.devicePixelRatio;
window.emulator.screen_adapter.set_scale(scale,scale);
// High DPI support
if (navigator.userAgent.includes('Windows')) {
var scale = window.devicePixelRatio;
window.emulator.screen_adapter.set_scale(scale,scale);
}
// Restore state. We can't do this right away.
setTimeout(async () => {