Update: EmulationStation random video screensaver - use only media from a particular system, back and favorites controls
-
@pjft said in Update: EmulationStation random video screensaver - use only media from a particular system, back and favorites controls:
Is it that the game entry shows on screen but isn't selected, or
The game details show right.
The game entry is selected, but it's not on screen, or
It is selected but the cursor is not visible on the screen resp. the visible part of the gamelist is not aligned with the selection.
Another game entry remains selected
No.
I have put together a video: https://jumpshare.com/v/0H8mGGhc0JL1veSdZOPp
From the video: The screensaver starts with "Gunforce" in Systen Mame, but the view on the gamelist is still at the beginning. (Note: you can also use Right during screensaver to identify a game that has these conditions (longer gamelist and game shown in screensaver not on first page) at your setup),
Hope you can reconstruct the issue now.
Here is my
es_settings.cfg
: https://gist.github.com/Gemba/225d926e52a1a4e90e046370186c708cI have been using
f604dcf
from main/HEAD: https://github.com/RetroPie/EmulationStation
I have your latest PR #847 left aside for this testcase, because I get a compile error:[ 70%] Building CXX object es-app/CMakeFiles/emulationstation.dir/src/CollectionSystemManager.cpp.o /home/pi/git/emu_master_clean/es-app/src/SystemScreenSaver.cpp: In member function ‘virtual void SystemScreenSaver::selectGame(bool)’: /home/pi/git/emu_master_clean/es-app/src/SystemScreenSaver.cpp:604:4: error: ‘mCurrentView’ was not declared in this scope mCurrentView->onShow(); ^~~~~~~~~~~~
-
@Lolonois Thank you so much - I'll review these later in the day! If I can't narrow it down I will very likely just force an up and a subsequent-immediate-down input to force the List component to refresh <awkward smile>. :) But we'll get to the bottom of this.
Also, apologies - I didn't mean to ignore some of your previous questions or comments, so if I miss any please call me out - I reply on the phone at times, or in the middle of other things and it happens.
You had asked me whether it was intentional that when using Left multiple times (without Right in between), that the images toggle on each Left between current and previous.
That was a very deliberate battle against my own instincts, but happy to be persuaded otherwise.
The main driver for the back use case was those occasions when I suddenly glance at the screensaver in the background - that every now and then I enjoy having on during the day - and notice a game that I'm curious about but, when I get there, it has moved on to the next. That has happened more often than not, so I thought of implementing "back".
The main question here was, then, that if one would move back once, why not move back more times? Well then, how many times? Infinite times, potentially? A predefined number of times (5? 10?). Sure enough, I could do them all - and I did hesitate. And what if you interrupt the screensaver in the middle of multiple back motions? Would you resume the screensaver where you left off? Could you potentially start the screensaver again and continue going back - storing the entire queue of videos that had been played so far?
Since the use case that I found more often was "darn, what was that game that I just too a glimpse of but it moved on to the next", and honestly I don't think there's often a "hey, let me go back to that specific game I saw 3 videos ago" use case, I kept it at a single back scenario.
Now the question was: well, what happens after you go back? What if now you want to return to the video that was playing since you did see it (for whatever reason - maybe you just want to go back to add it to a collection, and then resume the normal screensaver). We could either have "back" not to anything and stay in the same video, or - since it wouldn't hurt and it's still technically correct as it was "the video that was showing right before the one that's playing right now", I thought that this would be a workable compromise of sorts, and that I would not be overengineering things with the full-length queue just because I could :) The alternative would be for me to implement that when someone presses "right" after pressing "back", which could also be done, I suppose.
Well, this was the long story of that design decision. None of this is set in stone - hence the post here, so that folks try it out and get a feel for what works, what times some time to get used to, and what's just poorly designed (I am very confident that one of my future PRs has a high risk of falling in that category, and that's why it's still being slowly iterated on).
Let me know your thoughts in this regard, and how you see it.
@roslof Thank you for the feedback - happy that this is useful! Very valid remark, and of course I'll change that - I never want to break muscle memory for anything unless there's a very good reason (which, frankly, this isn't). I personally do not use the Jump To menu often, and since - unless I'm misremembering - some of the other projects have a "Launch Screensaver" entry on top of the Select menu (that's what I call it, but I should probably know better!), I thought I'd just adopt that position.
It should be changed now in the PR I mentioned above - https://github.com/RetroPie/EmulationStation/pull/847 - if you want to test it and see how it feels. I'm used to having SORT and JUMP be next to one another, so maybe I'll push it down one more row, but let me know your thoughts. I don't know if SORT gets used a lot, to be honest.
Thanks both - I'll try to send some updates to this in the coming days, and same for setting the default collection that one can add the games to from the screensaver.
Have a great week!
-
@Lolonois got it - this was perfect. From reading your settings file and the relevant options you had set, I changed the option on my end and I can confirm that it relates to
<bool name="UseFullscreenPaging" value="true" />
I believe you're more familiar with that part of the code, any thoughts at first glance of what might be the issue there? If not, I'll happily stumble through it later, but maybe it's something obvious to you? :)
-
@pjft said in Update: EmulationStation random video screensaver - use only media from a particular system, back and favorites controls:
maybe it's something obvious to you
Quick update: Obvious not, but I dealt with it in the past, right. I have an idea, let me vet it. Leave this with me. And thanks for pinpointing the complete context of this glitch.
-
@Lolonois Not at all, you did all the hard work to help pinpoint this!
To be fair, the two other scenarios where I expected the same to happen - using JUMP TO and FILTERing the gamelist - don't cause this behavior. And, furthermore, when the game returns from being launched it, indeed, resumes the normal behavior, so it must be some weird case there.
The only thing I'm doing on my end is calling setFocus(game) which, I suppose, I expected to set the focus on that game. It seems it does, but the mList component for the view does not follow it.
I suppose that, for the sake of abstraction, I kind of expected it to work the same regardless of that option being enabled (that'd be the preferred scenario). If not, sure enough, I can accommodate that on the selection flow when exiting the screensaver, though it will feel more like a workaround rather than a proper fix for the underlying cause :)
I may have more time for this in the weekend or next week, so if I have some time I'll also check it out.
Thank you!
-
emulationstation-dev f604dc built from source:
When select the first (top) game in any system or auto-collection (I don't use custom-collection), then when exit game and return to ES, game titles are blank and cursor is misplaced.
Scroll left-right to another system and back, issue remains. Scroll up or down to another title, issue corrects.
Does not present on emulationstation-dev 01de76 install from binary.
Does not present when any game except the first is selected.
Does present across multiple themes/systems/collections.
Screenshots:
es_settings.cfg
:pi@retropie:~ $ cat .emulationstation/es_settings.cfg <?xml version="1.0"?> <bool name="BackgroundIndexing" value="false" /> <bool name="BackgroundJoystickInput" value="false" /> <bool name="CaptionsCompatibility" value="true" /> <bool name="CollectionShowSystemInfo" value="true" /> <bool name="DisableKidStartMenu" value="true" /> <bool name="DoublePressRemovesFromFavs" value="false" /> <bool name="DrawFramerate" value="false" /> <bool name="EnableSounds" value="false" /> <bool name="ForceDisableFilters" value="false" /> <bool name="IgnoreLeadingArticles" value="true" /> <bool name="LocalArt" value="false" /> <bool name="MoveCarousel" value="true" /> <bool name="ParseGamelistOnly" value="false" /> <bool name="QuickSystemSelect" value="true" /> <bool name="ScrapeRatings" value="false" /> <bool name="ScreenSaverControls" value="true" /> <bool name="ScreenSaverOmxPlayer" value="false" /> <bool name="ScreenSaverVideoMute" value="true" /> <bool name="ShowHelpPrompts" value="true" /> <bool name="ShowHiddenFiles" value="false" /> <bool name="SlideshowScreenSaverCustomMediaSource" value="true" /> <bool name="SlideshowScreenSaverRecurse" value="false" /> <bool name="SlideshowScreenSaverStretch" value="false" /> <bool name="SortAllSystems" value="false" /> <bool name="StretchVideoOnScreenSaver" value="false" /> <bool name="SystemSleepTimeHintDisplayed" value="false" /> <bool name="ThreadedLoading" value="true" /> <bool name="UseCustomCollectionsSystem" value="true" /> <bool name="UseFullscreenPaging" value="true" /> <bool name="VideoAudio" value="false" /> <bool name="VideoOmxPlayer" value="false" /> <int name="MaxVRAM" value="80" /> <int name="ScraperResizeHeight" value="0" /> <int name="ScraperResizeWidth" value="400" /> <int name="ScreenSaverSwapMediaTimeout" value="10000" /> <int name="ScreenSaverSwapVideoTimeout" value="30000" /> <int name="ScreenSaverTime" value="300000" /> <int name="SubtitleSize" value="55" /> <int name="SystemSleepTime" value="0" /> <string name="AudioCard" value="default" /> <string name="AudioDevice" value="HDMI" /> <string name="CollectionSystemsAuto" value="all,recent" /> <string name="CollectionSystemsCustom" value="" /> <string name="GamelistViewStyle" value="automatic" /> <string name="LeadingArticles" value="a,an,the" /> <string name="OMXAudioDev" value="both" /> <string name="PowerSaverMode" value="disabled" /> <string name="SaveGamelistsMode" value="on exit" /> <string name="Scraper" value="ScreenScraper" /> <string name="ScreenSaverBehavior" value="random video" /> <string name="ScreenSaverGameInfo" value="start & end" /> <string name="SlideshowScreenSaverBackgroundAudioFile" value="/home/pi/.emulationstation/slideshow/audio/slideshow_bg.wav" /> <string name="SlideshowScreenSaverImageFilter" value=".png,.jpg" /> <string name="SlideshowScreenSaverMediaDir" value="/home/pi/.emulationstation/slideshow/image" /> <string name="SlideshowScreenSaverVideoFilter" value=".mp4,.avi" /> <string name="StartupSystem" value="" /> <string name="SubtitleAlignment" value="center" /> <string name="SubtitleFont" value="/usr/share/fonts/truetype/freefont/FreeSans.ttf" /> <string name="SubtitleItalicFont" value="/usr/share/fonts/truetype/freefont/FreeSansOblique.ttf" /> <string name="ThemeSet" value="carbon" /> <string name="TransitionStyle" value="instant" /> <string name="UIMode" value="Full" /> <string name="UIMode_passkey" value="uuddlrlrba" /> <string name="VlcScreenSaverResolution" value="original" />
-
@sleve_mcdichael said in Update: EmulationStation random video screensaver - use only media from a particular system, back and favorites controls:
<bool name="UseFullscreenPaging" value="true" />
Thanks! It's actually a different/related symptom to what @Lolonois is looking into. Can you disable "Use LB/RB for full screen paging" and see if it changes things?
-
@sleve_mcdichael However, just to add: if you do confirm that this is effectively something that you can absolutely not reproduce in 01de7618d0d248fa2ff1eacde09a20d9d2af5f10 that's both an useful insight for bisecting things, but also unexpected as most commits since then are mine and related to this, and I don't think I changed anything that would have changed that behavior...
...though that's what anyone would say :)
This is helpful, thank you so much.
Assuming I can replicate it, this will go a long way towards narrowing it down. I'll try to bisect it here - thanks!
-
EDIT: TL;DR: yes, it's not reproduceable in 01de76. I was tired and running the wrong binary.
@sleve_mcdichael Ok, just to close this and I'll start editing this last post for updates, but so nobody spends more time on this without this update:
- I can (EDIT: NOT) reproduce this on 01de76 for some
weirdreason related to my failure to run the binary I was building.I will try to go a bit further back and see when I can't stop reproducing the issue and bisect it.I will curl in a corner and cry, and then bisect it properly!
This shouldn't happen if you disable the full page scroll with the LB/RB buttons.
Did you per chance enable them today (I think not)?This happened to me when I got into that messed up state @Lolonois reported, so since I suppose fixing this may help with fixing the original symptom reported as well, I am invested in fixing this :) I'll report back and update this post with the bisect results.
Still, if you can 100% confirm that it does not happen on your 01de76, I'd love to dig a bit more into this, but I can 100% replicate this now by:
- Starting ES
- Moving right (just, because, why not?)
- Opening that system
- Starting the first game
- Returning to ES (in my case, I just go to runcommand and tell it to exit without launching. It should not affect this at all!). - I can (EDIT: NOT) reproduce this on 01de76 for some
-
@pjft I am still seeing it with full-screen paging disabled:
(disabled via cfg before launching ES)
-
@pjft also, when returning from a game at or near the bottom of the list, the selected title appears vertically centered, even if that means blank lines after the final entry. Full screen paging does not affect this either.
(When browsing normally, the list stops scrolling at the bottom and the cursor itself moves down the last few entries instead of remaining centered.)
-
@sleve_mcdichael Awesome. Yes, this is on me, I just bisected it to an attempt at improving ES performance. Sigh. I'll revert it for now.
Can you test the latest emulationstation-dev code?
Also, for the last examples, can you check whether it is fixed - and, if not, if they were working on the previous commit you mentioned? Thank you.
@Lolonois alas, this was unrelated to your symptoms, the behavior you shared is still present. I can help dig into it if you give me guidance or directions.
-
@pjft said in Update: EmulationStation random video screensaver - use only media from a particular system, back and favorites controls:
The only thing I'm doing on my end is calling setFocus(game) which, I suppose, I expected to set the focus on that game. It seems it does, but the mList component for the view does not follow it.
You are right and were pretty close with setting
setCursor()
. However, the list renderer got confused as there was no user navigation to the game in question.Two things happened and cumulated.
One: Without the
setViewportTop(-1)
in theselectGame()
the renderer ofTextListComponent.h
[1] is not pre-initialize with "place cursor mid on screen with selected game", in turn this de-railed the cursor placement in the subsequentviewportTop()
[2].Two: For some reasons the
mCursorPrev
was not-1
(initial value) even withsetViewportTop(-1)
, which then made an assumption fail inviewportTop()
. (The assumption was that a user can only navigate to game after entering the system manually). It came to me when forcing the cursor to be mid-aligned, the previous cursor position is irrelevant (=it is safe to set to -1).This is what the patch [3] does.
PS: I had to inspect the values in
render()
andviewportTop()
to get to this conclusion.PPS: Once you find this working ok, I have a followup PR to make the code more understandable (i.e. replacing -1 with an constant with a meaningful name).
[1] https://github.com/RetroPie/EmulationStation/blob/19fd7d9ae91f22caca948acc46fb9dac587b2023/es-app/src/components/TextListComponent.h#L142
[2] https://github.com/RetroPie/EmulationStation/blob/19fd7d9ae91f22caca948acc46fb9dac587b2023/es-app/src/components/TextListComponent.h#L257
[3] https://github.com/RetroPie/EmulationStation/pull/850 -
@Lolonois Thank you! I'll test it out later, but I trust your judgement there. I left a comment on the PR.
-
Just updating everyone here, I believe most of the reported issues have been fixed by now. Thanks @Lolonois for the help with the bugfixing as well.
If you all can update to the latest code, do let us know if there's anything missing on this end.
Thanks all.
-
@pjft Yes most of the alignment issues seem to be resolved with this latest update, that I can tell. I do still see one, which is a bit older, dating back to the addition of "full screen paging" option:
For most of the length of the gamelist, the cursor is "pinned" to the middle and the list contents "scroll" by underneath it. Except when near the top and bottom of the list, where the list is pinned and the cursor moves to cover those first/last few selections.
Normally, after PgUp/PgDn or Random (L/R or X) are used, the cursor always ends up in the middle (unless it's at one of these list-end positions) as if you had navigated to it with Up/Down.
When full-screen paging is enabled, however, then if the cursor is in one of these off-center positions, then when use PgUp/PgDn or Random, the list "jumps" to the new selection but the cursor remains still in the same position it was before*:
*(unless the random-selected game was already visible on the same page as the previous one, in which case only the cursor moves while the list remains pinned.)
Expected: when not at list-top or list-bottom, cursor would be centered regardless of how navigated to:
For random, this would be fairly simple: just have the list moves to the appropriate position and the cursor jumps to center (or as close to it as possible) as if the title were navigated to with up/down.
For PgDn from list-top (and reverse, PgUp from list-bottom) is a tricky one I think -- if both the list and cursor each scroll exactly 1 page, clearly the cursor's relative position on-screen wouldn't change. So one or the other of them needs to scroll a different amount from these positions.
At first guess I would want to scroll the list one full page and move the cursor ~1.5 pages to the screen-middle. But then from this position, cursor in the middle, you'd expect it to still be middle after a PgUp again also, and so requiring an additional PgUp to reach list-top again where it had started. This down-up-up asymmetry may be not be desirable.
Another option would be to scroll the cursor a full page, and then scroll the list roughly half a page to center it. The benefit here is, that a single PgUp would then scroll the cursor back up to where you started, instead of needing asymmetrical down-up-up like the first way.
I think either of this would feel most natural to me vs. still having the cursor off-middle when the list isn't at one end.
A third option, that I don't like as much: if the cursor is above center, then PgDn just moves it to center, and the next PgDn moves the list underneath it.
-
@sleve_mcdichael Thanks for testing and confirming. I'll consider the update from this thread closed then.
Regarding the nuances you're raising, I appreciate the detail. They are, however, not related to this thread so I'll both leave it to @Lolonois to evaluate how to proceed (or not), and if someone decides to look into it, I'd ask that we create a new forum post altogether - or reply in a previous post where the LB/RB scrolling was announced/introduced (if it exists), so as to keep things in the right context.
Thanks and have a great week.
-
@pjft said in Update: EmulationStation random video screensaver - use only media from a particular system, back and favorites controls:
if you want to test it and see how it feels. I'm used to having SORT and JUMP be next to one another, so maybe I'll push it down one more row, but let me know your thoughts. I don't know if SORT gets used a lot, to be honest.
I had to wait for the PR to be committed, because I'm not so savvy with PR merges. :) But now that I've had a chance to hammer on your changes (still using the es-epicnoir theme) I'm happy to report that I found no significant problems.
@pjft again, your work is appreciated. It's really nice to go back 1 video + land on the exact game without launching.
Cheers!
-dg -
@roslof Thanks for the reply - great to hear that all is sorted on that front. I still have one more thing to do here - which is to allow the user to define the default collection to use for "Favorites" during the screensaver (I personally have a "Games To Try Out Later" collection), but afterwards this should be closed.
I have something moderately more fun in the pipeline, and I believe/hope that it might be something that you personally may enjoy. I wish I'd had a better timeline for it (I kind of wanted to be working on it already but, alas, real life and work have picked up after the Christmas break), but keep an eye out for things. I sohuld make some progress on it in the coming weeks, I hope.
Cheers!
-
Ok, to close off this entire chapter, the latest
emulationstation-dev
code now has an option to specify the default collection to store the "favorites" selected during the screensaver. Useful in case you have a collection of "games to try out" that you want to add those games to, instead of sending to Favorites games you potentially never played but would like to check out at a later stage.I'd appreciate testing the usual scenarios - images vs video screensaver, etc. I gave it a thorough testing session but at some point in time it just gets hard to keep track of all the different edge cases, so I'd rather send this to all of you to test (and hopefully have fun) during the weekend.
If this is all solid (famous last words) then I'll be ready to move on to something else now!
Cheers.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.