Two questions regarding MacOS

Community Forums/General Help/Two questions regarding MacOS

Ravl(Posted 2014) [#1]
I bought myself a Macbook and I had to rebuild my Mac version for Crystals of Time. One publisher asked me to put a function to open an URL when the game quits.

I had the following issues:
- I used OpenURL right before End, after EndGraphics:
When the game exits 2 Windows of Chrome appears: one with the link and one empty

- While testing my app from the IDE, when the game exits I saw in Output this line: GUI is not supported in Fullscreen

Any ideas what is happening?

Thanks,


markcw(Posted 2014) [#2]
That's an OpenGL/Cocoa error.

https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSOpenGLContext_Class/Reference/Reference.html#jumpTo_19

See post 30 here
http://www.blitzmax.com/Community/posts.php?topic=93712

And post 4 here
http://www.blitzbasic.com/Community/posts.php?topic=59142


Matty(Posted 2014) [#3]
How old are those posts? All I can see is they say "1+ years ago" - could be upto 10 years....is it still current?


AdamStrange(Posted 2014) [#4]
Also Macs now have a new fullscreen mode which needs some rewriting of the maxgui code to support

cmd+Q to quit is simple as you just need to move to a messaging based system and check for EVENT_APPTERMINATE & EVENT_WINDOWCLOSE - but you should be doing this anyway

opening a new window on app quit is also frowned upon both by apple and users - just a thought


markcw(Posted 2014) [#5]
Matty, yeah could be out of date now, I'm not a Mac user really.

I looked in the Max source and there is no message exactly like this.

I believe what you need to do is switch from fullscreen to windowed first and then call openurl.


*(Posted 2014) [#6]
You could call the URL from a maxgui window or add a small delay maybe the graphics haven't been closed fully when you call openurl


Ravl(Posted 2014) [#7]
the 2 browser windows problem does not appear anymore;

regarding the message, does not affect my game in any way.

@munch: yeah, that trick (going in 'window mode' and then open url) was ok. removed the debug message.

Thank you again guys,

R.