diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2012-02-22 21:18:05 +1100 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2012-02-28 11:44:59 +1100 |
commit | b37e6bc8c119289aca8740dd5e3b60d72f9d6b40 (patch) | |
tree | 7ee9d491811c950943f0fc068d2e2b460ff05c6d /firmware/target/hosted/ypr0 | |
parent | 15c69b8bafc3e89e1a825b5bbefef4a97f0001b1 (diff) | |
download | rockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.tar.gz rockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.zip |
lcd drivers: Convert lcd_[remote_]framebuffer to a pointer
Change all lcd drivers to using a pointer to the static framebuffer
instead of directly accessing the static array. This will let us
later do fun things like dynamic framebuffer sizes (RaaA) or
ability to use different buffers for different layers (dynamic
skin backdrops!)
Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
Diffstat (limited to 'firmware/target/hosted/ypr0')
-rw-r--r-- | firmware/target/hosted/ypr0/lcd-ypr0.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/hosted/ypr0/lcd-ypr0.c b/firmware/target/hosted/ypr0/lcd-ypr0.c index 083a9fbe28..40528c298a 100644 --- a/firmware/target/hosted/ypr0/lcd-ypr0.c +++ b/firmware/target/hosted/ypr0/lcd-ypr0.c | |||
@@ -39,7 +39,7 @@ fb_data *dev_fb = 0; | |||
39 | void lcd_shutdown(void) | 39 | void lcd_shutdown(void) |
40 | { | 40 | { |
41 | printf("FB closed."); | 41 | printf("FB closed."); |
42 | munmap(dev_fb, sizeof(lcd_framebuffer)); | 42 | munmap(dev_fb, FRAMEBUFFER_SIZE); |
43 | close(dev_fd); | 43 | close(dev_fd); |
44 | } | 44 | } |
45 | 45 | ||
@@ -80,7 +80,7 @@ void lcd_init_device(void) | |||
80 | 80 | ||
81 | /* Figure out the size of the screen in bytes */ | 81 | /* Figure out the size of the screen in bytes */ |
82 | screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8; | 82 | screensize = vinfo.xres * vinfo.yres * vinfo.bits_per_pixel / 8; |
83 | if (screensize != sizeof(lcd_framebuffer)) | 83 | if (screensize != FRAMEBUFFER_SIZE) |
84 | { | 84 | { |
85 | exit(4); | 85 | exit(4); |
86 | perror("Display and framebuffer mismatch!\n"); | 86 | perror("Display and framebuffer mismatch!\n"); |