diff options
-rw-r--r-- | screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -58,7 +58,9 @@ int screen_open(int width, int height, int bpp) screen_bpp = bpp; screen_offset = 0; /* Can we get front buffer offset in vram? */ screen_pitch = screen_width*(screen_bpp/8); - screen_pitch = (screen_pitch | 255)+1; /* Align on 256 bytes boundary */ + if ((screen_pitch & 255)!=0) { + screen_pitch = (screen_pitch | 255)+1; /* Align on 256 bytes boundary */ + } printf("Screen: %dx%dx%d, pitch=%d, offset=0x%08x\n", screen_width, screen_height, screen_bpp, |