aligrudi / fbpdf

A small framebuffer pdf, djvu, epub, xps, and cbz viewer
http://litcave.rudi.ir/
BSD 3-Clause "New" or "Revised" License
188 stars 31 forks source link

fbpdf: fbval_t doesn't match fb #11

Open pcouderc12 opened 2 years ago

pcouderc12 commented 2 years ago

Please explain this error and how to work around it. Thank you. (It is on a raspberry pi zero)

aligrudi commented 2 years ago

pcouderc12 @.***> wrote:

Please explain this error and how to work around it. Thank you.

Please use the current version of fbpad: fbval_t is removed and you no longer need to worry about it. Before that, you needed to change the type of fbval_t to match the depth of your framebuffer device. For instance, if you had a 16-bit frambuffer, the type of fbval_t must have been unsigned short.

Ali
pcouderc12 commented 2 years ago

Mmm, I do not understand well : should I remove the fb_mode() test ? Currently, if I copy the last version of draw.* from fbpad to fbpdf and I get the same error...

aligrudi commented 2 years ago

pcouderc12 @.***> wrote:

Mmm, I do not understand well : should I remove the fb_mode() test ? Currently, if I copy the last version of draw.* from fbpad to fbpdf and I get the same error...

Sorry. I thought the issue was about fbpad. In fbpdf you still need to modify fbval_t based on framebuffer depth. It is defined in doc.h:

typedef unsigned int fbval_t;

If you are using a 16-bit framebuffer, change int to short, and if you are using an 8-bit framebuffer, change it to char.

Ali
pcouderc12 commented 2 years ago

OK, thank you very much