]> git.sesse.net Git - ccbs/commitdiff
Fix the pitch check (pitch from SDL is in bytes, not pixels).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 18 Feb 2012 01:54:48 +0000 (02:54 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 18 Feb 2012 01:54:48 +0000 (02:54 +0100)
bigscreen/ccbs_bigscreen.cpp

index 2694e3711850820c72904153a5ef762e298a3252..129206d4ec14d8db9aeda58434d947d044f16a99 100644 (file)
@@ -144,7 +144,7 @@ void main_loop(pqxx::connection &conn)
        }
 
        if (mainscreen && mainscreen->check_invalidated()) {
-               if (screen->pitch == SCREEN_WIDTH) {
+               if (screen->pitch == SCREEN_WIDTH * 4) {
                        SDL_LockSurface(screen);
                        mainscreen->draw((unsigned char *)screen->pixels, SCREEN_WIDTH, SCREEN_HEIGHT);
                        SDL_UnlockSurface(screen);