Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: verion on May 23, 2015, 03:58:34 PM

Title: Seeing Desktop on OS X when launching & ending games
Post by: verion on May 23, 2015, 03:58:34 PM
EDIT: cleaned up post a little

SYSTEM: OSX 10.10 + AM 1.5.2
PROBLEM: when I launch a game AM dissappears for a moment showing desktop

To be exact it shows mission control - OS X specific function, something like "show all windows" (it looks like this - http://isolve.isolve.netdna-cdn.com/wp-content/uploads/2015/05/1-Preview-on-Mission-Control.jpg)

And it gets worse after that because when exiting mame it doesn't get back to Attract Mode - I have to ALT-TAB back to AM.

----

All this above happend with GENERAL > WINDOW MODE > set to FULL SCREEN
When it is set to WINDOW, everything works like it should.

----

status on all 3 window modes:

WINDOW MODE > WINDOW
- all ok

WINDOW MODE > FILL SCREEN
- shows desktop
- gets back to AM on game exit (but looses focus from time to time, with cursor showing on the top of AM window)

WINDOW MODE > FULL SCREEN
- shows desktop
- doesn't get back to AM on game exit

----

CPU: intel i5
SYSTEM: OS X 10.10.3
SLDMAME: 0.149
ATTRACT MODE: 1.5.2
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: raygun on May 24, 2015, 08:58:49 AM
hey verion, I split this out to its own topic from the rpi one.

Is there a reason you can't just set Attract-mode to "Fill Screen" mode?  That is the preferred mode if it works for you.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on May 26, 2015, 07:30:12 AM
Frankly - I don't see the difference between FULL SCREEN and FILL SCREEN
Both looks like full screen to me.

Fill screen supposed to be like - maximize window to fill the screen, but with the min/max/close buttons and menubar visible - right?
If so - it does't work that way. Fill screen gives mi full screen window (with all the controls hidden).

Anyway - I just want full screen mode (with only AM visible and everything else hidden), because I don't want AM to look like "just another app".
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: raygun on May 30, 2015, 10:04:46 PM
No "Fill Screen" is meant to fill the entire screen and hide the menubar, min/max/close etc (the entire OS)... It is the default mode for Attract-Mode and ideally would have worked for everyone so we wouldn't need the other ones.

Fullscreen Mode is there only because it hides the unity toolbar on Ubuntu.  But in my view it causes more problems such as not letting the emulator run correctly, etc. so it should only be used if you must.

Thanks for the report on the state of the OS X version.  I don't use it myself but I will take a look and see what I can do to make the transitions to emulators work better... ideas and suggestions always welcome

cheers
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on May 31, 2015, 03:11:13 AM
I'm attaching screenshot of how it looks - between leaving AM and launching MAME

I'm also attaching console log:  AM start > launching MAME > returning to AM > closing AM
I don't understand it at all - but maybe you'll find something there.

My understanding is - that it has to be something with switching current app focus from AM to MAME

---

And when in WINDOW mode - everything looks great. I can upload console log when in WINDOW mode if it helps
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: pbergmar on June 17, 2015, 04:15:24 AM
I have the same issue! Biggest problem is that attractmode loses focus when i quit mame. Is this fixable? Otherwise attractmode can't be used in a keyboard-less cabinet... :(
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on June 17, 2015, 04:24:37 AM
See my first post.
You can switch to window mode as a workaround - but it's not the solution for cabinet :)
You can also DISABLE mission control completely to "fix" desktop showing bug - but it is vital feature for me since I'm using AM on my main computer. And it doesn't fix that loosing focus bug - so no solution for key-less setup.

That issue has an open ticket on Github bug tracking list.
But I'm worried that it will be hard to pin-point and fix for Raygun - since he is on Ubuntu machine. And AFAIK he is only one that can fix this.

Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: pbergmar on June 17, 2015, 05:01:53 AM
I see. Thanks for your reply. Did window mode fix the "loosing focus bug"? I'll try it later..
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on June 17, 2015, 05:05:41 AM
Yes. It keeps the focus in window mode. I'm using it with arcade stick on TV and there is no need for keyboard and mouse.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: Mofy on July 07, 2015, 07:34:10 AM
first off, hello AM forum! Love the Front end, great stuff!

 Could osx be creating creating a new space on mame launch? This fits with the movement seen and also the screensaver triggering (only visible when clock is set to to show in screensaver) would also explain the focus loss.see edit below... Still not sure about the menu visibility.

EDIT:
So I was trying to make it worse  ;D to see what was breaking. When AM goes full / fill screen and launches mame, it hides the mouse in the bottom right hand corner. This triggers the hot corner there. For me it was activating the screen lock, and Verion I would bet money that is where your hot corner is for mission control.

Soo the mouse needs to remain a few pixles further left to avoid the hot corners or they need to be set to be active only on modifier.
Or modify the settings and reset them out on exit. Which might work, list here: http://stackoverflow.com/questions/28999030/receive-information-about-hot-corner-configuration-on-a-mac
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 07, 2015, 11:30:13 AM
Whoa!

Great catch!

I've disabled bottom-right hot corner... that was set to "show mission control" and...
- no more showing mission control on game start!
- no more "loosing focus"

Not a permanent solution, because hot corners are great feature, but at least we know how it could be fixed simply moving mouse cursor a few pixels on the left.

----

But the top menu bar is still visible (flashes) for a second before game starts.



Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 07, 2015, 11:45:13 AM
In windows and Linux there's an option to auto hide the menu bar. Does OS X have this option?
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 07, 2015, 11:51:10 AM
No, there is no option to hide menubar.

---

And the menubar is not visible in AM or in mame - it is visible when "Ready player" screen is displayed (in Robospin theme) or just after you start the game in other themes. And it is AM menubar - not mame.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: Mofy on July 07, 2015, 11:56:22 AM
Looks like it (menu bar) has been adressed:
https://github.com/mickelson/attract/blob/master/src/fe_util_osx.hpp (https://github.com/mickelson/attract/blob/master/src/fe_util_osx.hpp)

13 days ago, anyone built a mac build?
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 07, 2015, 12:12:21 PM
verion-

Try this to speed up launching into emulator from am, hopefully making the background less visible. Not sure what you mean by AM menu bar. 

Rem this section (toward bottom) to this:

//splash screen launching game
//local message = fe.add_text("Ready Player...",flx*0.0,fly*0.45,flw,flh*0.15);
//message.alpha = 0;
//message.style = Style.Bold;

and "message" in case transition section:

case Transition.EndLayout:
  red = brightrand();
  green = brightrand();
  blue = brightrand();
  filter.set_rgb (red,green,blue);
  title.set_rgb (red,green,blue);
  //year.set_rgb (red,green,blue);
  //message.set_rgb (red,green,blue);

Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 07, 2015, 02:09:32 PM
@omegaman

I think it will flash regardless of how quick the game will start.
But maybe that git-hub fix will deal with that.

The menu flash looks like in attached screen shot.

----

But I'm so glad that "mouse pointer in hot corner" issue was identified.
It was a tricky one - good job Mofy.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 07, 2015, 02:55:23 PM
That's the os x menu bar correct? Is that what you are referring to when you say am bar. Too bad os x doesn't have a hide menu bar option because that would easily solve the problem.

But, there may be another option. You could probably load an image.png when you transition to the game, basically like the fade in function in hyperspin. That would definitely hide that annoying menu bar.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 07, 2015, 03:45:07 PM
> Is that what you are referring to when you say am bar?

yes

> Too bad os x doesn't have a hide menu bar option because that would easily solve the problem.

OS X used to have that - previous version had something called "PresentationMode" - a simple switch in config file enabling "special" mode without menu and UI elements. But sadly it was removed in current version of the system.

> You could probably load an image.png when you transition to the game

Maybe... but I don't know how to do that. If you would be so kind and post a code snippet that can do that - I'd gladly test if that helps. A whole robospin layout.nut with that code would be even better. Regardless of that menu thing - this is something I was thinking about lately - instead of "Player Ready" screen - a simple black (or wallpaper like graphics) full screen splash with game title (wheel graphics) in center.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 07, 2015, 03:50:08 PM
Sure, Let me see what I can whip up.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 08, 2015, 12:18:28 AM
No change - menu is still visible for a moment.

But it is not that intrusive. Raygun is clearly working on hiding the menu, so maybe we can test it with next AM build and see if the problem goes away.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: Mofy on July 08, 2015, 04:07:50 AM
So it looks like we are not losing focus, but fullscreen on mame launch. Quick question Verion, do you also see the window chrome (the stoplight buttons and frame) when in mame mode, I can't check right now (at work, on lunch break) or I would post a screenshot.

 I will [try] and build the actual dev version tonight. To see if this fixes things.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 08, 2015, 04:25:09 AM
no - we are not loosing focus anymore - after bottom-right-corner issue tamed with hot corner disabled

no - there is no chrome visible

This is normal menu - but overlaid on AM fill screen (i.e. it doesn't squash AM screen vertically)

-----

Maybe it is important distinction - I'm using FILL SCREEN mode, not the FULL SCREEN mode.
in FULL SCREEN mode it is even worse - we have menu visible and AM screen disappears showing desktop (or other app windows), and we are loosing focus after game quit.

But according to Raygun - FILL SCREEN should be default option.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 08, 2015, 04:55:10 AM
You definitely want to use the fill screen option. On my windows and Linux setups, I never see the desktop at all. This is just an odd issue with OS X and am.

A fade in function that loads an image before launching the emulator would mask this type of behavior as well.  I was able to load an image from a to game transition that hides the desktop but unloading the image in the from game transition is giving me an issue.  I'm on the right track though.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 08, 2015, 06:06:10 AM
verion-

I forgot that raygun mentioned there was a fade in module in the reflect and cools layout. Could you try one of these layout and tell me if the result is the same. I am going to mess around with the fade in module today. Even a simple do statement loading an image from to game transition should work. 
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 08, 2015, 06:09:20 AM
same thing with reflect and cools layouts
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 08, 2015, 06:33:12 AM
Ok, thanks for the feedback. That helps a lot, I have to attend to some personal things for a few hours. But, when I get back I'll work on it some more. 
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: Mofy on July 08, 2015, 09:19:35 AM
Maybe it is important distinction - I'm using FILL SCREEN mode, not the FULL SCREEN mode.
in FULL SCREEN mode it is even worse - we have menu visible and AM screen disappears showing desktop (or other app windows), and we are loosing focus after game quit.

But according to Raygun - FILL SCREEN should be default option.

Awesome that explains why your screenshot looked better than mine  :D cheers.

I have been using full screen.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 08, 2015, 09:22:54 AM
Well... that screenshot was photoshopped to fit on forum in low res - it was taken on 27" display and cut-pasted just to illustrate the problem.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 08, 2015, 09:28:19 AM
I will [try] and build the actual dev version tonight. To see if this fixes things.

If it is not for pure fun of compiling :), maybe you can just wait - It seems that someone [h0tw1r3] is already planning to compile OS X binaries
http://forum.attractmode.org/index.php?topic=289.0
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 08, 2015, 03:31:33 PM
verion-

I made some changes to robospin including a butchered fadescreen with no timer. Need to see if it works on your system first.

Now for the changes. Under layout options, you can now choose blue, black, grid or none under one setting. The same goes for masking, you now have options for dark, darker, or none. I probably should do scanlines as well.

What you need to do: You need an image called splash.png in your layout folder to test the fadescreen. Also, make sure you have  backgrounds named bkg, bkg2, grid etc... 

This script is not to be released into the wild until further testing. Thanks...

Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 09, 2015, 02:18:57 AM
I've attached screencast video to show how it works.
It is with your latest .nut

recorded sequence: start AM - run the game - wait until info screen - press ESC - return to AM

I didn't noticed it earlier, but menu is flashing when launching the game, but also when returning from game.
Strange thing - when returning from game the menubar is from last used app BEFORE launching AM.
In video you can see ScreenFlow app (a screen recording app), but I've recorded screen twice - and the second time it was other app that was used before AM.

[attachment deleted by admin]
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 09, 2015, 04:12:26 AM
renamed black wallpaper to splash.png
normal speed + slow motion in video
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: omegaman on July 09, 2015, 04:38:01 AM
Odd, that its active over the splash screen. Hmm... is there any tricks that you can try on mac like setting up a control key to zoom in on the desktop just enough to hide the menu? Just as a temporary fix until a better solution is found. Maybe raygun can take a look at the apple SDK kit and come up with a solution.

Well, I guess I'll strip that code out of the script now since it didn't make any different at all and re-release it with new changes. How did you like the new changes? I still need to add a few more enhancements.   
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 09, 2015, 05:04:15 AM
I like the changes - and the dark and darker mask addition is a nice touch.

---

the bloom effects does not work for me - no change with on or off

---

I would like to see option to completely disable that info pane with game name - personally, I'm using it only if I want to find particular rom name (and changed it to display rom name instead of full name).

---

Are you using my cab image or still that old one before my retouching?
I've uploaded one with scanlines over the screen, but I can't remember if I've uploaded the one with scanlines turned off.
I can uploaded it if you want - but it is slightly different from the original one - so you'd have to reposition snap and marquee and change skew and pinch to fit my cab image.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: tomek on July 28, 2015, 02:49:08 PM
Hi All,

I've recently started putting together an arcade gizmo running on an old MacMini (Yosemite, the Mini is just within the age barrier) I had lying around. I too have run into some problems described here but I have resolved them to my satisfaction as follows:


The result is that I can boot the MacMini, I see the initial boot screen with the grey Apple logo, then I see the background image which is a part of the graphic design I chose for the whole experience and then AM loads. It makes for a pretty seamless and cohesive visual experience. I'll post some photos once I finish my layout.

Mind you, the MacMini is only ever going to be used as an arcade console, it will eventually live inside the cab I'm building so this solution may not work for you if you want to still use your Mac as a work machine.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 28, 2015, 02:56:03 PM
Mind you, the MacMini is only ever going to be used as an arcade console, it will eventually live inside the cab I'm building so this solution may not work for you if you want to still use your Mac as a work machine.

That's exactly how I'm using it. So close but no cigar :)
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: ladysephiroth on July 30, 2015, 07:54:11 PM
I'm having a similar issue in 10.10.4 -- AM is in a fullscreen mode in the menu system, but when I click on a game to run it, it pops up the dock to show the terminal/exe icon, and the menu bar and window top (stoplight, etc) pops up at the top of the screen. I'm not very good with code, so if it's going to be addressed in the next build I'll just wait, but I wanted to let you know!

 
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 31, 2015, 12:13:57 AM
Thanks, but you should switch to FILLSCREEN in settings and try if it helps.
FULLSCREEN is a special option to solve some linux problems - if I remember correctly.

FILLSCREEN should be default option for everybody.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: ladysephiroth on July 31, 2015, 07:34:05 AM
It is on Fillscreen (default) and it's still happening -- I did read the whole thread first and tried all of that :) Thanks!
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: verion on July 31, 2015, 07:38:09 AM
Maybe you could try with the newest build?
Download here: http://forum.attractmode.org/index.php?topic=289.0
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: shidarin on August 06, 2015, 11:55:24 PM
Having the same issue on Ubuntu 14.04 with fullscreen mode- I have to have it set to fullscreen or else the menu bar and dock appear.
Title: Re: Seeing Desktop on OS X when launching & ending games
Post by: tomek on August 08, 2015, 12:50:05 PM
Further to this. I've not really noticed it before because I'm just starting out with a custom layout and my initial one was extremely simple so it loaded fast. Now my layout has a large background video which takes a few moments to load. While it's loading the menu bar becomes visible and the screen goes white.

This is a pretty undesirable visual artefact. However I suspect that it may not have anything to do with AM but rather the underlying graphics library that it is based on.

This is with AM 1.5.2 on OS X 10.10.4.