mirror of https://github.com/odrling/Aegisub
Fix for HiDPI scaling of videos
This commit is contained in:
parent
b185a5e3c4
commit
e62087cb70
|
@ -190,8 +190,12 @@ void VideoDisplay::Render() try {
|
||||||
if (!viewport_height || !viewport_width)
|
if (!viewport_height || !viewport_width)
|
||||||
PositionVideo();
|
PositionVideo();
|
||||||
|
|
||||||
videoOut->Render(viewport_left, viewport_bottom, viewport_width, viewport_height);
|
// Note: Right now, GetContentScaleFactor() always returns 1
|
||||||
E(glViewport(0, std::min(viewport_bottom, 0), videoSize.GetWidth(), videoSize.GetHeight()));
|
// This should change with wxWidgets 3.2, and thus fix HiDPI scaling issues
|
||||||
|
videoOut->Render(viewport_left, viewport_bottom, viewport_width * GetContentScaleFactor(),
|
||||||
|
viewport_height * GetContentScaleFactor());
|
||||||
|
E(glViewport(0, std::min(viewport_bottom, 0), videoSize.GetWidth() * GetContentScaleFactor(),
|
||||||
|
videoSize.GetHeight() * GetContentScaleFactor()));
|
||||||
|
|
||||||
E(glMatrixMode(GL_PROJECTION));
|
E(glMatrixMode(GL_PROJECTION));
|
||||||
E(glLoadIdentity());
|
E(glLoadIdentity());
|
||||||
|
|
Loading…
Reference in New Issue