TvGuide in navigation history.... (1 Viewer)

joystick

MP Donator
  • Premium Supporter
  • January 26, 2006
    892
    39
    Home Country
    Germany Germany
    great! I'll give it a try tonight!
    thank you very much!
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    There is also BUG in original Mp 1.01 and previous

    When using only back button, with no Home button in remote.

    in public static void ActivateWindow(int newWindowId, bool replaceWindow) function
    line 746 in GUIWindowManager.cs

    [...]
    if (_listHistory.Count > 15)
    {
    _listHistory.RemoveAt(0);
    }
    [...]

    If user has no Home button, then after a while using TvGuide user ends up into situation where this
    _listHistory.Count goes over 15. Then Home window gets removed from the _listHistory. It was in position
    0.
    So _listHistory does not contain Home Window anymore.

    Then user starts to pres back button over and over again until 15 times is reached. What happens then:
    You have a function:

    public static void ShowPreviousWindow() in line 914.
    and there is a part:
    [...]
    if (_listHistory.Count == 0)
    {
    return;
    }

    [...]

    So you end up stucked into TvGuide and cannot get into homescreen anymore. Only to start tv by selecting
    channell in guide.

    Well My patch solves these problems, but if MP dev's decide to correct this only, and not touch whole
    history management, then above lines should be something like:


    if (_listHistory.Count == 0)
    {
    //return;
    // if _listhistorycount gets corrupted, go home
    _listHistory.Add((int)GUIWindow.Window.WINDOW_HOME);
    }


    regards,
     

    joystick

    MP Donator
  • Premium Supporter
  • January 26, 2006
    892
    39
    Home Country
    Germany Germany
    BIG THANKS,
    really working flawless, and something I wanted to have since I started using MP!!

    I Hope your changes will make it into svn or 1.02!!

    cheers
    joystick
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    I hope so too,

    but i think it should be optional feature until MP dev's will accept that to the svn.
    Allthough i really don't see the point of jumping between epg and fullscreen tv 15 times
    like current solution does.

    So question to the MP dev's:
    If i make a patch that makes this feature optional in MP, does
    it have a change to be included in MP ??


    regards,
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    but i think it should be optional feature until MP dev's will accept that to the svn.
    Allthough i really don't see the point of jumping between epg and fullscreen tv 15 times
    like current solution does.

    Indeed, just waiting that someone adds it to Mantis with 1.1.0 release tag...
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Mantis'ed and fixed it in rev. 22647.
    I solved it by preventing to add to sequences of 2 windows which are the same to the history.

    Assuming the history looks like the following:
    1) tv guide
    2) tv fullscreen
    3) tv guide

    If you move to tv fullscreen - this window is also added to the history but right after adding the new code checks if (pseudo-code)

    history[count-1]==history[count-3] AND history[count-2]==history[count-4]

    if so, it removes the last 2 entries.
    I found that to be a more general working approach as to just prevent a specific window from being added to the history.
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi.

    Okay. Thank you very very much.

    regards,

    ps. What about _listhistory going empty using backbutton and it does not contain "home screen" id. Ie. ending up stucked whatever id was last in _listhistory ?. I described this behavior also in this thread.
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Hi.

    Okay. Thank you very very much.

    regards,

    ps. What about _listhistory going empty using backbutton and it does not contain "home screen" id. Ie. ending up stucked whatever id was last in _listhistory ?. I described this behavior also in this thread.

    Thanks, must have slipt through :oops:
    Created a new mantis issue for that and fixed it right away :)
     

    Users who are viewing this thread

    Top Bottom