Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Where does GetDeviceHeight() and GetDeviceWidth() get data from? AGK2

Author
Message
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 22nd Jan 2015 14:07
On my 1920 x 1080 monitor, and running in full screen mode, GetDeviceHeight() reports a figure of 768 and GetDeviceWidth() reports 1024. Only when I use the commands GetMaxDeviceHeight() and GetMaxDeviceWidth() do I get the respective figures of 1080 and 1920. Given this, I was curious as to the function of GetDeviceHeight() and GetDeviceWidth(), should they not just report the current resolution?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Jan 2015 14:46
I would guess that on Windows, the Device Size is what you set in setWindowSize(). The window is essentially the device. For mobile devices, it will be the physical device size.

Quidquid latine dictum sit, altum sonatur
Polaraul
9
Years of Service
User Offline
Joined: 13th Dec 2014
Location:
Posted: 22nd Jan 2015 15:35
Many thanks BatVink. I think for now the only safe way of knowing the resolution in Windows is to call GetMaxDeviceHeight() and GetMaxDeviceWidth()
unlikely
12
Years of Service
User Offline
Joined: 5th Mar 2012
Location: Ohio, USA
Posted: 22nd Jan 2015 17:10
I believe GetDeviceWidth/Height() will return the buffer size, while GetMaxDeviceWidth/Height() are the screen resolution.

Using AppGameKit v2 T1 + T2!
Systems: Primary: Mac OS X 10.10
Secondary: Windows 7

Login to post a reply

Server time is: 2024-05-05 06:32:33
Your offset time is: 2024-05-05 06:32:33