Skip to content

Commit

Permalink
Fix the broken fades.
Browse files Browse the repository at this point in the history
  • Loading branch information
pphaneuf committed Feb 25, 2014
1 parent 4b2603f commit d276778
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 3 additions & 4 deletions skelton/svgalib/palette.cpp
Expand Up @@ -22,6 +22,8 @@
#include "autoconf.h"
#endif

#include "SDL.h"

#include <stdio.h>
#include <unistd.h>
#include "types.h"
Expand Down Expand Up @@ -118,10 +120,7 @@ int Fade::step() {
if(currentframe==destframe)
return 1;
else {
#if 0
if(dynamic_cast<Video_X11_8*>(video))
usleep(3000);
#endif
SDL_Delay(1);
for(int i(0); i<768; i++)
current[i]+=delta[i];
currentframe++;
Expand Down
5 changes: 5 additions & 0 deletions skelton/svgalib/video.cpp
Expand Up @@ -59,6 +59,11 @@ class Video_SDL : public Video {
}

virtual void end_frame() {
if (newpal) {
pal.set();
newpal = false;
}

Uint32 pixel_format;
int w, h;
SDL_QueryTexture(texture_, &pixel_format, NULL, &w, &h);
Expand Down

0 comments on commit d276778

Please sign in to comment.