From eedd89fb24097a19e4f14ff1525e9296eebe067b Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 3 Sep 2014 15:37:19 +0000 Subject: haiku patch diff --git a/configure.ac b/configure.ac index 595378b..fe71f5d 100644 --- a/configure.ac +++ b/configure.ac @@ -84,10 +84,12 @@ case $host in THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE" CFLAGS="$THREAD_CFLAGS $CFLAGS" ;; - *mingw32* | *cygwin*) + *mingw32* | *cygwin* | *haiku*) ;; *android*) ;; + *haiku*) + ;; *) AC_CHECK_LIB(pthread, pthread_create, [THREAD_LIBS="-lpthread"], -- 2.30.2 From 50582ee27e442625dfa0439566a3d2e1f14588b1 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 3 Sep 2014 19:54:24 +0000 Subject: gcc2 fix diff --git a/src/searching.c b/src/searching.c index 263f8df..f361b30 100644 --- a/src/searching.c +++ b/src/searching.c @@ -1199,6 +1199,8 @@ static int32_t dvdnav_find_vobu_by_tmap(dvdnav_t *this, dvd_state_t *state, uint64_t seek_offset = 0; uint32_t seek_idx = 0; int32_t result = 0; + uint32_t seek_remainder; + uint32_t seek_pct; dvdnav_pos_data_t *cell_bgn_lo = NULL; dvdnav_pos_data_t *cell_bgn_hi = NULL; dvdnav_pos_data_t *jump_lo = NULL; @@ -1225,8 +1227,8 @@ static int32_t dvdnav_find_vobu_by_tmap(dvdnav_t *this, dvd_state_t *state, /* calc time of jump_time relative to cell_bgn_lo */ seek_offset = jump->time - cell_bgn_lo->time; seek_idx = (uint32_t)(seek_offset / args->tmap_interval); - uint32_t seek_remainder = seek_offset - (seek_idx * args->tmap_interval); - uint32_t seek_pct = (seek_remainder * 1000) / args->tmap_interval; + seek_remainder = seek_offset - (seek_idx * args->tmap_interval); + seek_pct = (seek_remainder * 1000) / args->tmap_interval; /* get tmap entries on either side of jump_time */ jump_lo = &(dvdnav_pos_data_t){0}; @@ -1303,7 +1305,6 @@ static int32_t dvdnav_find_vobu_by_cell_boundaries(dvdnav_t *this, /* -1: Before. Always jump to a time that is < time_in_pts_ticks */ dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this, uint64_t time_in_pts_ticks, int32_t mode) { - if (mode != JUMP_MODE_TIME_DEFAULT) return DVDNAV_STATUS_ERR; int32_t result = DVDNAV_STATUS_ERR; dvd_state_t *state = NULL; uint32_t sector_off = 0; @@ -1311,6 +1312,8 @@ dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this, dvdnav_cell_data_t *cell_data = NULL; dvdnav_jump_args_t *args = NULL; + if (mode != JUMP_MODE_TIME_DEFAULT) return DVDNAV_STATUS_ERR; + jump = &(dvdnav_pos_data_t){0}; /* convert time to milliseconds */ jump->time = time_in_pts_ticks / 90; diff --git a/src/vm/vm.c b/src/vm/vm.c index 6c64e59..e707f9c 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -895,10 +895,12 @@ static int process_command(vm_t *vm, link_t link_values) { /* These should never be set in SystemSpace and/or MenuSpace */ /* vm->state.TTN_REG = rsm_tt; ?? */ /* vm->state.TT_PGCN_REG = vm->state.rsm_pgcN; ?? */ + { int i; for(i = 0; i < 5; i++) { vm->state.registers.SPRM[4 + i] = vm->state.rsm_regs[i]; } + } if(link_values.data1 != 0) vm->state.HL_BTNN_REG = link_values.data1 << 10; -- 2.30.2