Skip to content

Commit

Permalink
ensure intro movie is centered on linux
Browse files Browse the repository at this point in the history
revert atlimit8's commit from feef4e8
I attempted to reach him/her about the reasoning for this commit but did
not get a reply.

tested on Gentoo Linux with sdl-1.2.15, sdl-gfx-2.0.24 with:
  displayWidth:    1920
  displayHeight:   1200
  baseXResolution: 640
  baseYResolution: 400

see:
feef4e8
#678
#675
http://openxcom.org/bugs/openxcom/issues/294
  • Loading branch information
myk002 committed Apr 7, 2014
1 parent 0af0dd6 commit 8fbac7e
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/Engine/Flc.cpp
Expand Up @@ -507,22 +507,15 @@ void FlcMain(void (*frameCallBack)())
{ flc.quit=false;
SDL_Event event;

//#ifndef __NO_FLC
FlcInitFirstFrame();
#ifdef _WIN32
flc.offset = flc.dy * flc.mainscreen->pitch + flc.mainscreen->format->BytesPerPixel * flc.dx;
#else
SDL_Rect dstRect = {(Sint16)flc.dx, (Sint16)flc.dy, (Uint16)flc.screen_w, (Uint16)flc.screen_h};
flc.offset = 0;
#endif
while(!flc.quit) {
if (frameCallBack) (*frameCallBack)();
flc.FrameCount++;
if(FlcCheckFrame()) {
if (flc.FrameCount<=flc.HeaderFrames) {
//printf("Frame failure -- corrupt file?\n");
Log(LOG_ERROR) << "Frame failure -- corrupt file?";
return;
return;
} else {
if(flc.loop)
FlcInitFirstFrame();
Expand All @@ -542,13 +535,7 @@ void FlcMain(void (*frameCallBack)())
/* TODO: Track which rectangles have really changed */
//SDL_UpdateRect(flc.mainscreen, 0, 0, 0, 0);
if (flc.mainscreen != flc.realscreen->getSurface()->getSurface())
SDL_BlitSurface(flc.mainscreen, 0, flc.realscreen->getSurface()->getSurface(),
#ifdef _WIN32
0
#else
&dstRect
#endif
);
SDL_BlitSurface(flc.mainscreen, 0, flc.realscreen->getSurface()->getSurface(), 0);
flc.realscreen->flip();
}

Expand Down

0 comments on commit 8fbac7e

Please sign in to comment.