Re: [AD] Allegro 5 TODOs (from wiki)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 28-Nov-08, at 3:24 AM, Peter Hull wrote:
* Multi-monitor support (needs someone with >1 screen to test)

At the moment you should be able to enumerate additional screens but
it's not possible to go fullscreen on anything apart from the primary
screen at the moment. That would be great if you could have a look at
that over Christmas.

Anticipating that I wouldn't get round to it if I didn't do my homework before hand, I've started to play with this a bit. Obviously untested at the moment for want of a second monitor, but here's what I have done so far:

1. Replace the Carbon-based code in osx_get_num_video_adapters() and osx_get_monitor_info() with Cocoa-based functions. I don't know if this is actually useful, but it fits in nicer with the rest of the code and prevents any incompatibilities that may arise due to mixing them.

2. Added display adapter checks for create_display_win() and create_display_fs(); these will fail if the requested display number is larger than the number of current screens.

3. Added code to ALDisplayHelper to create the window on the requested screen, falling back to the mainScreen if no specific screen has been requested or the requested adapter number is larger than the number of current screens (this shouldn't happen of course).

With these changes:
ex_monitorinfo still works as before on my MacBook
ex_bitmap (&al) still works as before on my MacBook
ex_winfull fails because it can't create a window on display #1

Patch attached, let me know what you think.

Evert

Attachment: osx_multiwin.diff
Description: Binary data




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/