projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
[dcpomatic.git]
/
src
/
wx
/
film_viewer.cc
diff --git
a/src/wx/film_viewer.cc
b/src/wx/film_viewer.cc
index a2c4898382eb67e0c84f7047afa5489fa69c0d12..f426a7c6e9f86c77764b6274586abcb2760655d1 100644
(file)
--- a/
src/wx/film_viewer.cc
+++ b/
src/wx/film_viewer.cc
@@
-176,8
+176,8
@@
FilmViewer::timer ()
DCPTime const len = _film->length ();
DCPTime const len = _film->length ();
- if (len) {
- int const new_slider_position = 4096 * _player->video_position()
/ len
;
+ if (len
.get ()
) {
+ int const new_slider_position = 4096 * _player->video_position()
.get() / len.get()
;
if (new_slider_position != _slider->GetValue()) {
_slider->SetValue (new_slider_position);
}
if (new_slider_position != _slider->GetValue()) {
_slider->SetValue (new_slider_position);
}
@@
-399,7
+399,7
@@
FilmViewer::back_clicked ()
*/
DCPTime p = _player->video_position() - DCPTime::from_frames (2, _film->video_frame_rate ());
*/
DCPTime p = _player->video_position() - DCPTime::from_frames (2, _film->video_frame_rate ());
- if (p <
0
) {
+ if (p <
DCPTime ()
) {
p = DCPTime ();
}
p = DCPTime ();
}