- if (m_subtitle_widget)
- m_subtitle_widget->setPixmap(m_pixmap, eRect(ePoint(0, 0), m_pixmap->size()));
+ if (m_subtitle_widget) {
+ int x1,x2,y1,y2;
+ ddvd_get_last_blit_area(m_ddvdconfig, &x1, &x2, &y1, &y2);
+
+ int x_offset = 0, y_offset = 0, width = 720, height = 576;
+
+#ifdef DDVD_SUPPORTS_GET_BLIT_DESTINATION
+ ddvd_get_blit_destination(m_ddvdconfig, &x_offset, &y_offset, &width, &height);
+ eDebug("values got from ddvd: %d %d %d %d", x_offset, y_offset, width, height);
+ y_offset = -y_offset;
+ width -= x_offset * 2;
+ height -= y_offset * 2;
+#endif
+ eRect dest(x_offset, y_offset, width, height);
+
+ if (dest.width() && dest.height())
+ m_subtitle_widget->setPixmap(m_pixmap, eRect(x1, y1, (x2-x1)+1, (y2-y1)+1), dest);
+ }