Win32 window size confusion

Win32 window size confusion
0.0 0



I’ve managed to build cocos under Win32 using MingW32 (cross compiled under Linux). I’ve tried to make all my resolutions the same, Retina sized.

The problem is, I can’t for some reason set a Win32 window to 640x960 as it becomes huge, like double my display. It does this both on Windows and under Linux (yup, it runs there).

As can be seen by the screenshots, Linux runs fine, the Win32 320x480 is actually a resolution of 640x960 but scaled up, and the final image where I set it for a larger size, it’s huge.

Is there a way to create this window properly?


s-linux-640x960.png (67.5 KB)

s-win32-320x480.png (147.5 KB)

s-win32-on-linux-320x480.png (37.6 KB)

s-win32-on-linux-640x960.png (15.8 KB)


I’ve just put in some debug code and it prints out the following:

[CCEGLView::resize] (with, height) = 1280, 1920
[CCEGLView::resize] (newW, newH) = 1280, 1920

and the code I set is:

bool AppDelegate::initInstance()
 bool bRet = false;

// Initialize OpenGLView instance, that release by CCDirector when application terminate.
 // The HelloWorld is designed as HVGA.
 CCEGLView \* pMainWnd = new CCEGLView();
 CC\_BREAK\_IF( pMainWnd~~\>Create, 640, 960));


\#endif // CC\_PLATFORM\_WIN32

It also doesn’t matter what I set the screen scale to either. I’ve used 0.5, 0.25 and 2.0, all give the same results.