mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
DIRECTOR: Setting loop for stopped DV should actually play it
This commit is contained in:
parent
d1b0c5a986
commit
f6f669c953
@ -355,8 +355,6 @@ Graphics::MacWidget *DigitalVideoCastMember::createWidget(Common::Rect &bbox, Ch
|
||||
|
||||
_channel = channel;
|
||||
|
||||
warning("creating");
|
||||
|
||||
if (!_video || !_video->isVideoLoaded()) {
|
||||
warning("DigitalVideoCastMember::createWidget: No video decoder");
|
||||
delete widget;
|
||||
@ -453,10 +451,15 @@ void DigitalVideoCastMember::setMovieRate(double rate) {
|
||||
if (!_video)
|
||||
return;
|
||||
|
||||
_channel->_movieRate = rate;
|
||||
|
||||
if (rate < 0.0)
|
||||
warning("STUB: DigitalVideoCastMember::setMovieRate(%g)", rate);
|
||||
else
|
||||
_video->setRate(Common::Rational((int)(rate * 100.0), 100));
|
||||
|
||||
if (_video->endOfVideo())
|
||||
_video->rewind();
|
||||
}
|
||||
|
||||
void DigitalVideoCastMember::setFrameRate(int rate) {
|
||||
|
@ -23,6 +23,8 @@
|
||||
#ifndef DIRECTOR_CHANNEL_H
|
||||
#define DIRECTOR_CHANNEL_H
|
||||
|
||||
#include "director/cursor.h"
|
||||
|
||||
namespace Graphics {
|
||||
struct Surface;
|
||||
class ManagedSurface;
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "director/director.h"
|
||||
#include "director/cast.h"
|
||||
#include "director/channel.h"
|
||||
#include "director/castmember.h"
|
||||
#include "director/window.h"
|
||||
#include "director/util.h"
|
||||
@ -738,6 +739,9 @@ bool DigitalVideoCastMember::setField(int field, const Datum &d) {
|
||||
return true;
|
||||
case kTheLoop:
|
||||
_looping = (bool)d.asInt();
|
||||
if (_looping && _channel && _channel->_movieRate == 0.0) {
|
||||
setMovieRate(1.0);
|
||||
}
|
||||
return true;
|
||||
case kThePausedAtStart:
|
||||
_pausedAtStart = (bool)d.asInt();
|
||||
|
Loading…
x
Reference in New Issue
Block a user