Python Forum

Full Version: [cocos2d] how to use the second display
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm now using cocos2d to make some animation, and have two monitors,
I want to use the second monitor to display,
but the code cannot work,

firstly get the screen list,
screens =pyglet.window.get_platform().get_default_display().get_screens()
secondly, set the second monitor to display with fullscreen mode. (first monitor 0, second 1)
cocos.director.window.Window(screen=screens[1], fullscreen=True)
now show the animation, here layer test() just for example,
cocos.director.director.init()
scene=cocos.scene.Scene(test())
cocos.director.director.run(scene)
above code cannot work, how to correct it, thanks.