HACK: Add support for playing Theora-videos from the SmushPlayer, when playback of SMUSH-fails, this should perhaps result in a new class for handling codecs dynamically (so that we can resolve both the Aspyr-logo and Theora/Smush-juggling in a consistent way). Also hack the scaling for 1080p-videos for now.
This commit is contained in:
parent
be69f3141f
commit
1e5f5d6947
3 changed files with 66 additions and 12 deletions
|
@ -1630,6 +1630,14 @@ void GfxOpenGL::prepareMovieFrame(Graphics::Surface *frame) {
|
|||
int width = frame->w;
|
||||
byte *bitmap = (byte *)frame->getPixels();
|
||||
|
||||
double scaleW = _scaleW;
|
||||
double scaleH = _scaleH;
|
||||
// Remastered hack, don't scale full-screen videos for now.
|
||||
if (height == 1080) {
|
||||
_scaleW = 1.0f;
|
||||
_scaleH = 1.0f;
|
||||
}
|
||||
|
||||
GLenum format;
|
||||
GLenum dataType;
|
||||
int bytesPerPixel = frame->format.bytesPerPixel;
|
||||
|
@ -1692,9 +1700,18 @@ void GfxOpenGL::prepareMovieFrame(Graphics::Surface *frame) {
|
|||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
_smushWidth = (int)(width * _scaleW);
|
||||
_smushHeight = (int)(height * _scaleH);
|
||||
_scaleW = scaleW;
|
||||
_scaleH = scaleH;
|
||||
}
|
||||
|
||||
void GfxOpenGL::drawMovieFrame(int offsetX, int offsetY) {
|
||||
double scaleW = _scaleW;
|
||||
double scaleH = _scaleH;
|
||||
// Remastered hack, don't scale full-screen videos for now.
|
||||
if (_smushHeight == 1080) {
|
||||
_scaleW = 1.0f;
|
||||
_scaleH = 1.0f;
|
||||
}
|
||||
// prepare view
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
|
@ -1741,6 +1758,9 @@ void GfxOpenGL::drawMovieFrame(int offsetX, int offsetY) {
|
|||
glDepthMask(GL_TRUE);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_LIGHTING);
|
||||
|
||||
_scaleW = scaleW;
|
||||
_scaleH = scaleH;
|
||||
}
|
||||
|
||||
void GfxOpenGL::releaseMovieFrame() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue