diff options
-rw-r--r-- | apps/recorder/bmp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/recorder/bmp.c b/apps/recorder/bmp.c index 61d7430bb6..2e377df0ed 100644 --- a/apps/recorder/bmp.c +++ b/apps/recorder/bmp.c | |||
@@ -175,16 +175,16 @@ int read_bmp_file(char* filename, | |||
175 | PaddedWidth = (width * depth / 8 + 3) & ~3; | 175 | PaddedWidth = (width * depth / 8 + 3) & ~3; |
176 | 176 | ||
177 | #if LCD_DEPTH > 1 | 177 | #if LCD_DEPTH > 1 |
178 | if(format == FORMAT_ANY) { | 178 | if(format & FORMAT_ANY) { |
179 | if(depth == 1) | 179 | if(depth == 1) |
180 | format = FORMAT_MONO; | 180 | format = FORMAT_MONO; |
181 | else | 181 | else |
182 | format = FORMAT_NATIVE; | 182 | format = FORMAT_NATIVE; |
183 | } | 183 | } |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | /* PaddedHeight is for rockbox format. */ | 186 | /* PaddedHeight is for rockbox format. */ |
187 | if(format == FORMAT_MONO) { | 187 | if(format & FORMAT_MONO) { |
188 | PaddedHeight = (height + 7) / 8; | 188 | PaddedHeight = (height + 7) / 8; |
189 | totalsize = PaddedHeight * width; | 189 | totalsize = PaddedHeight * width; |
190 | } else { | 190 | } else { |
@@ -230,7 +230,7 @@ int read_bmp_file(char* filename, | |||
230 | lseek(fd, (off_t)readlong(&fh.OffBits), SEEK_SET); | 230 | lseek(fd, (off_t)readlong(&fh.OffBits), SEEK_SET); |
231 | 231 | ||
232 | #if LCD_DEPTH == 2 | 232 | #if LCD_DEPTH == 2 |
233 | if(format == FORMAT_NATIVE) | 233 | if(format & FORMAT_NATIVE) |
234 | memset(bitmap, 0, width * height / 4); | 234 | memset(bitmap, 0, width * height / 4); |
235 | #endif | 235 | #endif |
236 | 236 | ||
@@ -254,7 +254,7 @@ int read_bmp_file(char* filename, | |||
254 | switch(depth) { | 254 | switch(depth) { |
255 | case 1: | 255 | case 1: |
256 | #if LCD_DEPTH > 1 | 256 | #if LCD_DEPTH > 1 |
257 | if(format == FORMAT_MONO) { | 257 | if(format & FORMAT_MONO) { |
258 | #endif | 258 | #endif |
259 | /* Mono -> Mono */ | 259 | /* Mono -> Mono */ |
260 | for (col = 0; col < width; col++) { | 260 | for (col = 0; col < width; col++) { |
@@ -299,7 +299,7 @@ int read_bmp_file(char* filename, | |||
299 | case 24: | 299 | case 24: |
300 | p = bmpbuf; | 300 | p = bmpbuf; |
301 | #if LCD_DEPTH > 1 | 301 | #if LCD_DEPTH > 1 |
302 | if(format == FORMAT_MONO) { | 302 | if(format & FORMAT_MONO) { |
303 | #endif | 303 | #endif |
304 | /* RGB24 -> mono */ | 304 | /* RGB24 -> mono */ |
305 | for (col = 0; col < width; col++) { | 305 | for (col = 0; col < width; col++) { |