moai/moai-dev — pull request #793 by atis-- (2013-10-04 14:02:05+00:00)
Title: GLUT: set screen (device) resolution for app to use

It's very useful to know desktop (device, screen) resolution when creating your application window. According to this forum thread
http://getmoai.com/forums/get-screen-resolution-sdk-1-2-t894/
it's supposed to be stored as MOAIEnvironment.horizontal/verticalResolution. The GLUT host, however, presently stores the window size in there (after MOAISim.openWindow() call) which I think is incorrect and useless.

I've created this simple patch which uses glutGet() to fetch screen size as described here:
http://www.opengl.org/documentation/specs/glut/spec3/node70.html

Please review and include this!