Windows 10 - window size change update

Hi there,

I am trying to port my game to Windows 10. It works well on mobiles. Currently I am using FIXED_WIDTH or FIXED_HEIGHT policy (depending on the screen ratio). Unfortunately, it doesn’t work well on Windows 8/10 because user can scale the window in any direction. Somehow it works with SHOW_ALL, but with black borders.

How to deal with the window size change in Windows 10? What is a “good cocos2dx practice” for this situation?

I can’t find any “onSizeChange” (or something) so that I could relayout my UI. Should I implement it by myself?

How can I set the default window size? There is no GLViewImpl::createWithRect method for Windows 8/10.

Thanks,
kds

Anyone? :slight_smile:

Something like this was added recently, check if it helps:
https://github.com/cocos2d/cocos2d-x/pull/16578

1 Like

Thanks :slight_smile: I am working on older cocos, so couldn’t find it. Unfortunately, it is only for win32. Is there something similar (or do you have a plan to add in the future) for W10?