pcca-matrix / PCCA-Layout

HyperSpin layout for Attract-Mode
GNU General Public License v3.0
7 stars 6 forks source link

Screen saver black screen #35

Closed ghost closed 4 years ago

ghost commented 4 years ago

Screen saver shows a black screen when a system has only the default theme? My mame and daphne systems have many game themes and the screensaver works on them. Other systems with only the default themes show a blank black screen...

pcca-matrix commented 4 years ago

this shouldn't matter since it takes randomly from your system's video folder! what's your video format ? it only accepts mp4 and flv but I can add more if necessary

ghost commented 4 years ago

I have only mp4 and flv files as snap videos.

ghost commented 4 years ago

I suspect this is the problem: In the scrrensaver.nut I added a print ("vid = "+vid+"\n") to this function:

function get_new_video( obj )
{
    local sys;
    if(fe.game_info(Info.Emulator) == "@")
        sys = fe.game_info(Info.Title, rand() );
    else
        sys = fe.game_info(Info.Emulator);

    local a=0;
    local vid;

    while(1){
        vid = get_random_file(medias_path + sys + "/Video");
        print ("vid = "+vid+"\n");
        if( vid.find(".mp4") || vid.find(".flv") || a>5 )break;
        a++;
    }
    local s = split( vid, "/" );
    obj.file_name = vid;
    return s;
}

In Main Menu, Mame and Daphne where the screensaver works, the print output is for example (mame): vid = E:\HS_Themes\Media/mame/Video/uopoko.mp4 vid = E:\HS_Themes\Media/mame/Video/triothep.mp4 vid = E:\HS_Themes\Media/mame/Video/sfiii.mp4 vid = E:\HS_Themes\Media/mame/Video/lastday.mp4

When I go to any other system, the print is: vid = (loops forever until I exit the screensaver). It doesn't find a video to play...

My money is the problem is "Info.Emulator"!!

pcca-matrix commented 4 years ago

i noticed that , the fe.game_info returns empty on some system , dont know why

ghost commented 4 years ago

I confirmed the issue. If the Emulator name in the romlist is different than the display name, the result is vid=

Case study, Atari 2600 system: Screen saver blank screen with this:

#Name;Title;Emulator;CloneOf;Year;Manufacturer;......
2005 Minigame Multicart (USA) (Unl);2005 Minigame Multicart (USA) (Unl);atari2600;;2005;Self-Published;;;;;;;;;;;

Screen save works with this:

#Name;Title;Emulator;CloneOf;Year;Manufacturer;......
2005 Minigame Multicart (USA) (Unl);2005 Minigame Multicart (USA) (Unl);atari 2600;;2005;Self-Published;;;;;;;;;;;

Emulator name: atari2600 (blank) vs atari 2600 (works because same as display name in AM)

EDIT: Confirmed it also with atari lynx and atari 7800. in their romlists, I changed the Emulator string from 'atarilynx' to 'atari lynx' and 'atari7800' to 'atari 7800'.

Can the code use the [DisplayName] magic token instead of the Emulator string?

pcca-matrix commented 4 years ago

Confirmed , changed to fe.list.name as Fe.Display and info.System have erratic behvaior.

ghost commented 4 years ago

Resolved!

I want your family's secret recipe for Belgium Waffles !