diff options
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/menus.c | 4 | ||||
-rw-r--r-- | riscos/save.c | 2 | ||||
-rw-r--r-- | riscos/save_draw.c | 4 | ||||
-rw-r--r-- | riscos/save_draw.h | 4 | ||||
-rw-r--r-- | riscos/sprite.c | 9 | ||||
-rw-r--r-- | riscos/window.c | 1 |
6 files changed, 21 insertions, 3 deletions
diff --git a/riscos/menus.c b/riscos/menus.c index 1f12feb98..ab286a1c9 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -181,7 +181,9 @@ void ro_gui_menu_init(void) { "Page.Save", BROWSER_SAVE, &dialog_saveas }, { "Page.SaveComp", BROWSER_SAVE_COMPLETE, &dialog_saveas }, { "Page.Export", NO_ACTION, 0 }, +#ifdef WITH_DRAW_EXPORT { "Page.Export.Draw", BROWSER_EXPORT_DRAW, &dialog_saveas }, +#endif #ifdef WITH_PDF_EXPORT { "Page.Export.PDF", BROWSER_EXPORT_PDF, &dialog_saveas }, #endif @@ -200,7 +202,9 @@ void ro_gui_menu_init(void) { "Object.Object.ObjSave", BROWSER_OBJECT_SAVE, &dialog_saveas }, { "Object.Object.Export", BROWSER_OBJECT_EXPORT, 0 }, { "Object.Object.Export.Sprite", BROWSER_OBJECT_EXPORT_SPRITE, &dialog_saveas }, +#ifdef WITH_DRAW_EXPORT { "Object.Object.Export.ObjDraw", BROWSER_OBJECT_EXPORT_DRAW, &dialog_saveas }, +#endif { "Object.Object.SaveURL", NO_ACTION, 0 }, { "Object.Object.SaveURL.URI", BROWSER_OBJECT_SAVE_URL_URI, &dialog_saveas }, { "Object.Object.SaveURL.URL", BROWSER_OBJECT_SAVE_URL_URL, &dialog_saveas }, diff --git a/riscos/save.c b/riscos/save.c index 43b12a4f5..e49ce319d 100644 --- a/riscos/save.c +++ b/riscos/save.c @@ -833,8 +833,10 @@ bool ro_gui_save_content(struct content *c, char *path, bool force_overwrite) } switch (gui_save_current_type) { +#ifdef WITH_DRAW_EXPORT case GUI_SAVE_DRAW: return save_as_draw(c, path); +#endif #ifdef WITH_PDF_EXPORT case GUI_SAVE_PDF: return save_as_pdf(c, path); diff --git a/riscos/save_draw.c b/riscos/save_draw.c index a5dbb8df2..812b9409a 100644 --- a/riscos/save_draw.c +++ b/riscos/save_draw.c @@ -22,6 +22,8 @@ * Export a content as a DrawFile (implementation). */ +#ifdef WITH_DRAW_EXPORT + #include <assert.h> #include <limits.h> #include "oslib/draw.h" @@ -460,3 +462,5 @@ bool ro_save_draw_error(pencil_code code) return false; } + +#endif diff --git a/riscos/save_draw.h b/riscos/save_draw.h index 90d81c980..43861c484 100644 --- a/riscos/save_draw.h +++ b/riscos/save_draw.h @@ -19,9 +19,13 @@ #ifndef _NETSURF_RISCOS_SAVE_DRAW_H_ #define _NETSURF_RISCOS_SAVE_DRAW_H_ +#ifdef WITH_DRAW_EXPORT + #include <stdbool.h> struct content; bool save_as_draw(struct content *c, const char *path); #endif + +#endif diff --git a/riscos/sprite.c b/riscos/sprite.c index 899aef324..305a4f6f0 100644 --- a/riscos/sprite.c +++ b/riscos/sprite.c @@ -139,7 +139,8 @@ bool sprite_redraw(struct content *c, int x, int y, byte sprite_bpp(const osspriteop_header *s) { - /* bit 31 indicates the presence of a full alpha channel rather than a binary mask */ + /* bit 31 indicates the presence of a full alpha channel + * rather than a binary mask */ int type = ((unsigned)s->mode >> osspriteop_TYPE_SHIFT) & 15; byte bpp = 0; @@ -148,8 +149,10 @@ byte sprite_bpp(const osspriteop_header *s) { bits psr; int val; - if (!xos_read_mode_variable(s->mode, os_MODEVAR_LOG2_BPP, &val, &psr) && - !(psr & _C)) bpp = 1 << val; + if (!xos_read_mode_variable(s->mode, + os_MODEVAR_LOG2_BPP, &val, &psr) && + !(psr & _C)) + bpp = 1 << val; } break; case osspriteop_TYPE1BPP: bpp = 1; break; diff --git a/riscos/window.c b/riscos/window.c index 3427cd989..8e0a8b8d6 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -61,6 +61,7 @@ #include "riscos/options.h" #include "riscos/oslib_pre7.h" #include "riscos/save.h" +#include "riscos/sprite.h" #include "riscos/theme.h" #include "riscos/thumbnail.h" #include "riscos/url_complete.h" |