First of all thanks greyspot for trying to nail this... I'm looking for something like this for quite a while.
But... your formula seems to have a problem.. Althought aparently it's scaling correctly, infact the aspect ratio isn't being maintained. The image below show's how when doubled or tripled the window actually adds random vertical and horizontal rows of pixels, thus distorting it.
<img src="http://img841.imageshack.us/img841/3320/greyspotaspectratio.png">
As you can see marked in the left image with a red line there's an extra row of pixels added with the doubling method. I really wish there was a simple and effective way to scale pixel perfect an app in Construct, with or without captions.