Menu

#595 "Remember last button" with automatic register assign doesn't work for VMGM menus

common
closed
nobody
None
5
2015-10-04
2015-03-01
No

Looks like code generation for "remember last button" with automatic register using has bug: it saves one value into "last menu" registes but check other one in case of VMGM.

Here is snippets of code:

Pgc.cpp:164
preCommands = wxString::Format(vmgm ? wxT("g%d=1%02d;") : wxT("g%d=%d;"), lastMenuReg, pgci + 1) + preCommands;

Pgc.cpp:197
wxString expr1 = checkLastMenu ? wxString::Format(wxT("g%d==%d and "), lastMenuReg, pgci + 1) : wxT("");

So, in case "vmgm == true" value "1<pgci+1>" is saved but "<pgci+1>" is checked. It leads to situation when you return from titleset menu with many buttons to VMGM menu, VMGM menu could have unexistent button highlighted.</pgci+1></pgci+1>

Discussion

  • ecodrv

    ecodrv - 2015-03-02

    I forgot to report.

    (CASE 1)
    I put 2 vmgm menus and 1 titleset menu(I tick "root") and 2 titles in titleset 1.
    I put "call last menu;" in post commands of 2 titles.

    dvdauthor.xml says about vmgm menus:

    <pgc entry="title">
    ......
    <pre>if (g1==1 and g0 gt 0) button = g0; else button = 1024;g1=101;</pre>
    </pgc>
    ......
    <pre>if (g1==2 and g0 gt 0) button = g0; else button = 1024;g1=102;</pre>

    I think "g1==1" should be "g1==101".
    I think "g1==2" should be "g1==102".

    (CASE 2)
    I make the same dvd.

    dvdauthor.xml says about titleset 1 menu:

    <pgc entry="root">
    ......
    <pre>
    if (g1==1 and g0 gt 0) button = g0; else button = 1024;
    if (g1 & 0x8000 !=0) {g1^=0x8000;if (g1==101) jump vmgm menu 1;if (g1==102) jump vmgm menu 2;}
    g1=1;
    </pre>

    When bit15 of g1 is 1, "if (g1==1" does not work.
    I think dvdstyler should change the order like this.

    <pre>
    if (g1 & 0x8000 !=0) {g1^=0x8000;if (g1==101) jump vmgm menu 1;if (g1==102) jump vmgm menu 2;}
    if (g1==1 and g0 gt 0) button = g0; else button = 1024;
    g1=1;
    </pre>

     
  • NtAlex

    NtAlex - 2015-09-23

    fixed in DVDStyler 2.9.4 beta 1

     
  • ecodrv

    ecodrv - 2015-09-24

    I tried V2.9.4 beta 1. It has a small bug.

    I made the same dvd and looked at dvdauthor.xml.

    (1)
    Pre commands of vmgm menu 1 says
    "g1=101;if (g1==101 and g0 gt 0) button = g0; else button = 1024;".
    DVDStyler execute "g1=101;" before DVDStyler refers g1.

    After DVDStyler refers g1, DVDStyler should execute "g1=101;" at the end of the line.
    Like this:
    "if (g1==101 and g0 gt 0) button = g0; else button = 1024; g1=101;".

    Vmgm menu 2 is the same.

    (2)
    Pre commands of Titleset 1 menu 1 says
    "if (g1 & 0x8000 !=0) {g1^=0x8000;if (g1==101) jump vmgm menu 1;if (g1==102) jump vmgm menu 2;}g1=1;if (g1==1 and g0 gt 0) button = g0; else button = 1024;".

    After DVDStyler refers g1, DVDStyler should execute "g1=1;" at the end of the line.
    Like this:
    "if (g1 & 0x8000 !=0) {g1^=0x8000;if (g1==101) jump vmgm menu 1;if (g1==102) jump vmgm menu 2;} if (g1==1 and g0 gt 0) button = g0; else button = 1024; g1=1;".

    Thank you very much.

     
  • NtAlex

    NtAlex - 2015-09-25

    Unfortunatelly the changing the order of "jump to last menu commands" and "select last button commands" didn't work. Mixing these commands isn't also good idea. So I reverted the order, but changed "select last button commands" to
    if (g1 & 0x FFFF ==1 and g0 gt 0) button = g0; else button = 1024;
    And I plan to publish next beta today

     
  • ecodrv

    ecodrv - 2015-09-25

    I am sorry I do not look at source code.

    I guess you mean
    "if (g1 & 0x7FFF ==1 and g0 gt 0) button = g0; else button = 1024;".
    I believe it will work fine.

    Thank you very much.

     
  • NtAlex

    NtAlex - 2015-09-26

    Actually the highest 4 bit are intended for controlling so that 0xFFF should also work.
    Second beta is published now. And thank you for the testing!

     
  • ecodrv

    ecodrv - 2015-09-26

    I tried to download and install "DVDStyler-2.9.4b2-win32.exe" 3 times.
    But "The setup files are corrupted. Please obtain a new copy of the program." is displayed.
    The file size of "DVDStyler-2.9.4b2-win32.exe" is 10.4MB.
    The file size of "DVDStyler-2.9.4b1-win32.exe" is 23.0MB.

    cheers

     
  • NtAlex

    NtAlex - 2015-09-27

    sorry, I just uploaded it again.

     
  • ecodrv

    ecodrv - 2015-09-27

    I tried V2.9.4 beta 2.
    It works fine !

    Thank you very much for your great job !

     
  • NtAlex

    NtAlex - 2015-10-04
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB