Commit 9d094e02 authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf

Add button forced selection when FOSL_BTNN is present

This allows to force the the selection of the current button when activating
a SPU stream.

The behavior is inaccurate though, FOSL_BTNN is supposed to update the register
at time HLI_S_PTM. But it will be good enough for now.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 304970fe
......@@ -39,6 +39,7 @@
#include <dvdread/ifo_types.h> /* For vm_cmd_t */
#include "vm/decoder.h"
#include "vm/vm.h"
#include "vm/getset.h"
#include "dvdnav_internal.h"
#include "read_cache.h"
#include <dvdread/nav_read.h>
......@@ -790,6 +791,14 @@ dvdnav_status_t dvdnav_get_next_cache_block(dvdnav_t *this, uint8_t **buf,
fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE stream_id_pan_scan=%d\n",stream_change->physical_pan_scan);
fprintf(MSG_OUT, "libdvdnav: SPU_STREAM_CHANGE returning DVDNAV_STATUS_OK\n");
/* This is not realy the right place to do this. FOSL_BTNN should set the register
* at HLI_S_PTM rather than when we enter the SPU. As well we should activate FOAC_BTNN
* at HLI_E_PTM
if (this->pci.hli.hl_gi.fosl_btnn != 0) {
set_HL_BTN(this->vm, this->pci.hli.hl_gi.fosl_btnn);
......@@ -216,6 +216,13 @@ void set_RSMinfo(vm_t *vm, int cellN, int blockN) {
/* Force the highlight button number register */
void set_HL_BTN(vm_t *vm, int btnn)
(vm->state).HL_BTNN_REG = btnn << 10;
/* Get functions */
/* Searches the TT tables, to find the current TT.
......@@ -38,6 +38,7 @@ int set_MENU(vm_t *vm, int menu);
int set_PGCN(vm_t *vm, int pgcN);
int set_PGN(vm_t *vm); /* Set PGN based on (vm->state).CellN */
void set_RSMinfo(vm_t *vm, int cellN, int blockN);
void set_HL_BTN(vm_t *vm, int btnn);
/* Get */
int get_TT(vm_t *vm, int vtsN, int vts_ttn);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment