diff options
Diffstat (limited to 'anzeige.c')
-rw-r--r-- | anzeige.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -95,13 +95,17 @@ int main(int argc, char **argv) scroll_buffers[0].scroll_len = render(text_buffer, TEXT_BUFFER_LENGTH, scroll_buffers[0].buf, sizeof(scroll_buffers[0].buf), 1); - i=0; + i=-40; while (display_data.keep_running) { usleep(100000); for (j=0; j<40; j++) - display_data.buf[(display_data.should_buf+1)%3][j] = scroll_buffers[0].buf[(i+j) % scroll_buffers[0].scroll_len]; + if (i+j<0) + display_data.buf[(display_data.should_buf+1)%3][j] = 0; + else + display_data.buf[(display_data.should_buf+1)%3][j] = scroll_buffers[0].buf[(i+j) % scroll_buffers[0].scroll_len]; display_data.should_buf = (display_data.should_buf+1)%3; i++; + i = i % scroll_buffers[0].scroll_len; } free(text_buffer); |