Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screensaver overlays for static image snaps #260

Open
ches opened this issue Aug 23, 2016 · 0 comments
Open

Screensaver overlays for static image snaps #260

ches opened this issue Aug 23, 2016 · 0 comments

Comments

@ches
Copy link

ches commented Aug 23, 2016

Hi,

Thanks for your work on Attract Mode, I have a Mac Mini for an entertainment machine so it's great to have a quality, easy-to-use open source frontend that runs on a Mac.

This is a request/suggestion to improve the default behavior of the screensaver for users without video preview snaps. The out-of-the-box experience is that wheel overlays don't appear to work when they've been enabled in configuration. Even with only static image snaps, guests sometimes wonder which game they're seeing on the screensaver, so I'd like to have the overlays work for images too.

The only thing preventing this from working as expected is code that assumes the presence of a video duration. Here's a patch that I've used to work around it:

--- /Applications/Attract.app/Contents/config/screensaver/screensaver.nut.bck   2016-08-23 21:49:40.000000000 +0700
+++ /Applications/Attract.app/Contents/config/screensaver/screensaver.nut   2016-08-23 21:49:49.000000000 +0700
@@ -99,7 +99,7 @@
            {
                // start fade out 2 seconds before video ends
                // for wheels
-               out_time = ttime + duration - 2000;
+               out_time = ttime + duration - 1000;
            }
            else
            {
@@ -170,7 +170,14 @@
        get_new_offset( obj );
        obj.video_playing = true;

-       logo.init( obj.index_offset, ttime, obj.video_duration );
+        if ( obj.video_duration > 0 )
+        {
+            logo.init( obj.index_offset, ttime, obj.video_duration );
+        }
+        else
+        {
+            logo.init( obj.index_offset, ttime, MIN_TIME );
+        }
    }

    function reset()

I extended the time before the overlay fadeout starts because otherwise it's too short with the 4-second MIN_TIME (code review should say to update the comment, heh). This works acceptably well for my need, but could probably be better and that's why I haven't just sent a pull request… The fadeout of the overlay makes the abrupt "slide change" a moment later look a bit odd.

I wonder if the transition between images could be a dissolve through black, instead of a straight cut. Then maybe the overlay images could just remain on instead of fading out, fading away with the snap itself. Not sure if that will look okay with video or if it would be best to handle video and images differently.

I've got about 5 minutes of experience with Squirrel and the Attract scripting API exposed, so I don't know how simple this would be, but I could try taking the idea further when time permits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant