Rev 1473 | Rev 1682 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1473 | Rev 1671 | ||
---|---|---|---|
Line 163... | Line 163... | ||
163 | 163 | ||
164 | 164 | ||
165 | /** Scroll screen one row up */ |
165 | /** Scroll screen one row up */ |
166 | static void scroll_screen(void) |
166 | static void scroll_screen(void) |
167 | { |
167 | { |
168 | unsigned int i; |
- | |
169 | __u8 *lastline = &fbaddress[(rows - 1) * ROW_BYTES]; |
168 | __u8 *lastline = &fbaddress[(rows - 1) * ROW_BYTES]; |
170 | 169 | ||
171 | memcpy((void *) fbaddress, (void *) &fbaddress[ROW_BYTES], scanline * yres - ROW_BYTES); |
170 | memcpy((void *) fbaddress, (void *) &fbaddress[ROW_BYTES], scanline * yres - ROW_BYTES); |
172 | 171 | ||
173 | /* Clear last row */ |
172 | /* Clear last row */ |
174 | if (blankline) { |
- | |
175 | memcpy((void *) lastline, (void *) blankline, ROW_BYTES); |
173 | memcpy((void *) lastline, (void *) blankline, ROW_BYTES); |
176 | } else { |
- | |
177 | for (i = 0; i < FONT_SCANLINES; i++) |
- | |
178 | clear_line((rows - 1) * FONT_SCANLINES + i); |
- | |
179 | - | ||
180 | if (config.mm_initialized) { |
- | |
181 | /* Save a blank line aside. */ |
- | |
182 | blankline = (__u8 *) malloc(ROW_BYTES, FRAME_ATOMIC); |
- | |
183 | if (blankline) |
- | |
184 | memcpy((void *) blankline, (void *) lastline, ROW_BYTES); |
- | |
185 | } |
- | |
186 | } |
- | |
187 | } |
174 | } |
188 | 175 | ||
189 | 176 | ||
190 | static void invert_pixel(unsigned int x, unsigned int y) |
177 | static void invert_pixel(unsigned int x, unsigned int y) |
191 | { |
178 | { |
Line 359... | Line 346... | ||
359 | 346 | ||
360 | rows = y / FONT_SCANLINES; |
347 | rows = y / FONT_SCANLINES; |
361 | columns = x / COL_WIDTH; |
348 | columns = x / COL_WIDTH; |
362 | 349 | ||
363 | clear_screen(); |
350 | clear_screen(); |
- | 351 | blankline = (__u8 *) malloc(ROW_BYTES, FRAME_ATOMIC); |
|
- | 352 | ASSERT(blankline); |
|
- | 353 | memcpy((void *) blankline, (void *) &fbaddress[(rows - 1) * ROW_BYTES], ROW_BYTES); |
|
- | 354 | ||
364 | draw_logo(xres - helenos_width, 0); |
355 | draw_logo(xres - helenos_width, 0); |
365 | invert_cursor(); |
356 | invert_cursor(); |
366 | 357 | ||
367 | chardev_initialize("fb", &framebuffer, &fb_ops); |
358 | chardev_initialize("fb", &framebuffer, &fb_ops); |
368 | stdout = &framebuffer; |
359 | stdout = &framebuffer; |