RetroPie / EmulationStation

A Fork of Emulation Station for RetroPie. Emulation Station is a flexible emulator front-end supporting keyboardless navigation and custom system themes.
Other
855 stars 344 forks source link

[EmulationStation-Experimental] Systems with no gamelist.xml don't show up #281

Closed LodanZark closed 6 years ago

LodanZark commented 6 years ago

When I was using this commit: 7c35ad50054e895faa5adb28b7f4aa7ac9e62b18 everything was fine but since last commits the systems that don't have the gamelist.xml file aren't displaying on the system select menu.

zigurana commented 6 years ago

Hi @LodanZark, I cannot reproduce your issue (on my windows machine, but still). Please tell me more about your setup.

LodanZark commented 6 years ago

Hellow @zigurana

Personally I do prefer console games to be display just with name and cover art so since this commit ( cd2f2ee42b911711db6bd6e0276bea494a389e88 ) I only use gamelist.xml for the arcade games.

I am using the Kiosk mode, I am not aware if I am using any flags and here it's my es_settings.cfg

<?xml version="1.0"?>
<bool name="BackgroundJoystickInput" value="false" />
<bool name="CaptionsCompatibility" value="true" />
<bool name="DrawFramerate" value="false" />
<bool name="EnableSounds" value="true" />
<bool name="FavoritesOnly" value="false" />
<bool name="MoveCarousel" value="true" />
<bool name="ParseGamelistOnly" value="false" />
<bool name="QuickSystemSelect" value="false" />
<bool name="SaveGamelistsOnExit" value="true" />
<bool name="ScrapeRatings" value="false" />
<bool name="ScreenSaverControls" value="true" />
<bool name="ScreenSaverOmxPlayer" value="true" />
<bool name="ShowHelpPrompts" value="true" />
<bool name="ShowHiddenFiles" value="false" />
<bool name="SlideshowScreenSaverCustomImageSource" value="true" />
<bool name="SlideshowScreenSaverRecurse" value="false" />
<bool name="SlideshowScreenSaverStretch" value="false" />
<bool name="SortAllSystems" value="false" />
<bool name="StretchVideoOnScreenSaver" value="true" />
<bool name="UseCustomCollectionsSystem" value="true" />
<bool name="VideoAudio" value="true" />
<bool name="VideoOmxPlayer" value="false" />
<int name="MaxVRAM" value="80" />
<int name="ScraperResizeHeight" value="0" />
<int name="ScraperResizeWidth" value="602" />
<int name="ScreenSaverSwapImageTimeout" value="10000" />
<int name="ScreenSaverSwapVideoTimeout" value="30000" />
<int name="ScreenSaverTime" value="300000" />
<string name="AudioDevice" value="PCM" />
<string name="CollectionSystemsAuto" value="" />
<string name="CollectionSystemsCustom" value="" />
<string name="GamelistViewStyle" value="automatic" />
<string name="OMXAudioDev" value="both" />
<string name="PowerSaverMode" value="disabled" />
<string name="Scraper" value="TheGamesDB" />
<string name="ScreenSaverBehavior" value="slideshow" />
<string name="ScreenSaverGameInfo" value="never" />
<string name="SlideshowScreenSaverBackgroundAudioFile" value="/opt/retropie/configs/all/emulationstation/slideshow/audio/slideshow_bg.wav" />
<string name="SlideshowScreenSaverImageDir" value="/opt/retropie/configs/all/emulationstation/slideshow/image" />
<string name="SlideshowScreenSaverImageFilter" value=".png,.jpg" />
<string name="ThemeSet" value="eudora-powa" />
<string name="TransitionStyle" value="instant" />
<string name="UIMode" value="Kiosk" />
<string name="UIMode_passkey" value="uuddlrlrba" />
pjft commented 6 years ago

I'm puzzled as to what that commit might have changed in that regard.

What's the content of your es_settings.cfg file? And what happens if you rename your arcade gamelist.xml to something else (gamelist.bak, for instance)?

zigurana commented 6 years ago

Do the systems re-appear when you switch back to Full UI?

LodanZark commented 6 years ago

My es_system.cfg it's available in the third comment of this ticket.

After rename the gamelist.xml to gamelist.xml.bak followed by the system reboot made the system i edited to disappear from the menu.

I also noticed a minor issue in the bottom of the system selection, the first system to be displayed it shows "system info" instead the number of games, and only display the value after moving back and forth.

LodanZark commented 6 years ago

@zigurana Just tested, yes if I turn kiosk to full the systems became visible, but going back to kiosk make them disappear again.

tomaz82 commented 6 years ago

@zigurana FileFilterIndex.cpp line 253 Why is filterByHidden set to true in kiosk mode?

Definitely something regarding the hidden flag going weird, but I can't really follow the logic in the FileFilterIndex code so I can't debug it any further.

Edit: okay, I see why filterByHidden is true now, starting to understand how all this works.

tomaz82 commented 6 years ago

Okay, I see it now, this looks for games with hidden == FALSE and displays only those, problem is, without a gamelist.xml you have no value at all in any of the ***IndexFilteredKeys so it won't find a FALSE in hiddenIndexFilteredKeys, thus hidding all games for that system.

zigurana commented 6 years ago

@tomaz82 yes and no. If there is no valid metadata, it should be reverting to the default values, which is 'false' for 'hidden'.

tomaz82 commented 6 years ago

@zigurana Maybe so, but it doesn't, all ***IndexFilteredKeys are empty

zigurana commented 6 years ago

Hmm, ok, I 'll have another look tonight, doesn't explain why I don' t see the same issue when I remove/rename the gamelist file.

zigurana commented 6 years ago

But I agree, this is probably the root-cause

LodanZark commented 6 years ago

@zigurana you need to make sure the gamelist it's renamed\removed from /opt/retropie/configs/all/emulationstation/gamelists/ and also from the rom folder.

tomaz82 commented 6 years ago

@zigurana

Gamelist.cpp method parseGamelist line 149:

This is where it calls FileFilterIndex::addToIndex(FileData* game) This never happens for games not in a gamelist.xml, so they don't get the ****IndexAllKeys set up properly. This breaks ALL filters for games outside a gamelist.xml, which for all other filters makes sense, if you filter by "Racing" then obviously a game that's unknown will be filtered away. But in this case it also means that all files outside a gamelist.xml are treated as hidden.

The reason is that setFilter fails because it can't add a key that's not part of allIndexKeys. And when it can't do that it wont find the "FALSE"

zigurana commented 6 years ago

Well tracked-down!

tomaz82 commented 6 years ago

@zigurana I'm working on a fix, PR incoming soon :)

pjft commented 6 years ago

@tomaz82 I take it the fix is on the filtering end rather than on the gamelist population end? :)

tomaz82 commented 6 years ago

https://github.com/RetroPie/EmulationStation/pull/285

@pjft Yepp! The fix parses all games and adds the filters, outside the actual gamelist.xml parsing.