From 570d0810ca5aefb7295d7cb5f1d81387d31c7420 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 18 Feb 2012 02:54:48 +0100 Subject: [PATCH] Fix the pitch check (pitch from SDL is in bytes, not pixels). --- bigscreen/ccbs_bigscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index 2694e37..129206d 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -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); -- 2.39.2