Answered by:

Windows Simulator 10.6" 1920x1080 snapped view wrong size?

Question

Based on various posts here and MSDN, I've written code in my game to detect snapped view by looking for a back buffer width of 320 pixels. When I see this, I pause my game and show an appropriate message. HOWEVER, while testing snapped view at various resolutions
and orientations in the simulator, I noticed that in 10.6" 1920x1080 snapped view reports the back buffer as 447, not 320! All of the other supported resolutions correctly set the snapped size to 320, even the 23" edition of 1920x1080.

Is this a known in the simulator or did I miss something?

Thanks,

-Rob Targosz

www.eragion.com

Thursday, December 27, 2012 3:34 AM

Answers

The snapped area of course is not always 320px wide - just think of a high-res display with 320dpi, having a snapped area width of only 1 inch.

Windows will scale the area automatically, just like Windows scales images and Font sizes. Since this is done automatically, you don't really need to care. At least when you work with XAML. No idea if you need to care when using DirectX.

All replies

The snapped area of course is not always 320px wide - just think of a high-res display with 320dpi, having a snapped area width of only 1 inch.

Windows will scale the area automatically, just like Windows scales images and Font sizes. Since this is done automatically, you don't really need to care. At least when you work with XAML. No idea if you need to care when using DirectX.

The Hyper-V simulator itself shows exactly 320px wide in 10.6" 1366x768 and 27" 2560x1440, but not for 10.6" 1920x1080.

Finally, I have a dozen or so different test systems running Win8 with resolutions from 1366x768 through to 2560x1440 and all of them show exactly 320px.

Yes, the docs are definitely wrong. Or at least not complete. As far as I can tell, the physical width of the snapped area depends on the dpi of the physical screen: similar to the auto-scaling of images, fonts and XAML control sizes, the snapped area is
auto-scaled. I didn't do the math, but I suspect the snapped area has sizes of 320px, 320px*140% and 320px*180%.