Open menu naturally via chapter events; M returns to menu; debounce M

The menu state machine advances from the menu-intro state to the menu state
only when the menu video crosses its chapter-2 marker (onChapter). Fire
onChapter from the video loop as PTS crosses playlist markers. Also route the
M key through the onMenu dispatcher so it returns to the menu video/title
(not just drawing menu items), and debounce the key against auto-repeat.
This commit is contained in:
2026-09-16 08:52:16 -04:00
parent 43cc8f420c
commit 1a4330f291
2 changed files with 8 additions and 5 deletions
@@ -80,8 +80,6 @@ public class MoviePlayer extends BaseNativeObject {
if (!previousMenuMode && this.menuMode) {
VsmxBaseObject callback = controller.getPropertyValue("onMenu");
System.err.println("[menu] onMenu fires, callback=" + callback
+ " (" + (callback == null ? "null" : callback.getClass().getSimpleName()) + ")");
if (callback instanceof VsmxFunction function) {
interpreter.interpretFunction(function, null, new VsmxBaseObject[0]);
}