summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-01-30 18:23:48 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2013-01-30 18:23:48 (GMT)
commit89856f55929907642013e45435b9d18cd1fafe36 (patch)
treecb78b000bc2e477fc4c265ad21a32087ce4508bc
parent663191791eda7034c3d7d99a4039eca8ba02b441 (diff)
downloadnetsurf-mono/windom-gui.tar.gz
netsurf-mono/windom-gui.tar.bz2
ifdef some code that will never work under AmigaOS <4.0mono/windom-gui
-rw-r--r--amiga/bitmap.c5
-rwxr-xr-xamiga/gui.c10
-rwxr-xr-xamiga/gui_options.c10
-rwxr-xr-xamiga/plotters.c4
-rw-r--r--amiga/theme.c2
5 files changed, 26 insertions, 5 deletions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index 3a2bc70..2fa8eb7 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -402,6 +402,7 @@ static struct BitMap *ami_bitmap_get_truecolour(struct bitmap *bitmap,int width,
if(GfxBase->LibNode.lib_Version >= 53) // AutoDoc says v52, but this function isn't in OS4.0, so checking for v53 (OS4.1)
{
+#ifdef __amigaos4__
uint32 comptype = COMPOSITE_Src;
uint32 flags = 0;
@@ -420,9 +421,9 @@ static struct BitMap *ami_bitmap_get_truecolour(struct bitmap *bitmap,int width,
COMPTAG_OffsetY,0,
COMPTAG_FriendBitMap,friendbm,
TAG_DONE);
+#endif
}
- else /* do it the old-fashioned way. This is pretty slow, but probably
- uses Composite() on OS4.1 anyway, so we're only saving a blit really. */
+ else /* Do it the old-fashioned way. This is pretty slow, even on OS4.1 */
{
bsa.bsa_SrcX = 0;
bsa.bsa_SrcY = 0;
diff --git a/amiga/gui.c b/amiga/gui.c
index c964583..eb5af26 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -477,15 +477,19 @@ void ami_set_options(void)
tree_set_icon_dir(strdup("ENV:Sys"));
-
nsoption_setnull_charp(arexx_dir, (char *)strdup("Rexx"));
-
nsoption_setnull_charp(arexx_startup, (char *)strdup("Startup.nsrx"));
-
nsoption_setnull_charp(arexx_shutdown, (char *)strdup("Shutdown.nsrx"));
if(!nsoption_int(window_width)) nsoption_set_int(window_width, 800);
if(!nsoption_int(window_height)) nsoption_set_int(window_height, 600);
+
+#ifndef __amigaos4__
+ nsoption_set_bool(download_notify, false);
+ nsoption_set_bool(context_menu, false);
+ nsoption_set_bool(font_antialiasing, false);
+ nsoption_set_bool(truecolour_mouse_pointers, false);
+#endif
}
void ami_amiupdate(void)
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 7e4cef5..bfee479 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -731,12 +731,14 @@ void ami_gui_opts_open(void)
LAYOUT_SpaceOuter, TRUE,
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_Label, gadlab[GRP_OPTS_MOUSE],
+#ifdef __amigaos4__
LAYOUT_AddChild, gow->objects[GID_OPTS_PTRTRUE] = CheckBoxObject,
GA_ID, GID_OPTS_PTRTRUE,
GA_RelVerify, TRUE,
GA_Text, gadlab[GID_OPTS_PTRTRUE],
GA_Selected, nsoption_bool(truecolour_mouse_pointers),
CheckBoxEnd,
+#endif
LAYOUT_AddChild, gow->objects[GID_OPTS_PTROS] = CheckBoxObject,
GA_ID, GID_OPTS_PTROS,
GA_RelVerify, TRUE,
@@ -1072,6 +1074,7 @@ void ami_gui_opts_open(void)
LABEL_Text, gadlab[GID_OPTS_FONT_MINSIZE],
LabelEnd,
LayoutEnd,
+#ifdef __amigaos4__
LAYOUT_AddChild,VGroupObject,
LAYOUT_SpaceOuter, TRUE,
LAYOUT_BevelStyle, BVS_GROUP,
@@ -1083,6 +1086,7 @@ void ami_gui_opts_open(void)
GA_Selected, nsoption_bool(font_antialiasing),
CheckBoxEnd,
LayoutEnd,
+#endif
LayoutEnd,
CHILD_WeightedHeight, 0,
LayoutEnd, // page vgroup
@@ -1207,6 +1211,7 @@ void ami_gui_opts_open(void)
GA_Text, gadlab[GID_OPTS_OVERWRITE],
GA_Selected, nsoption_bool(ask_overwrite),
CheckBoxEnd,
+#ifdef __amigaos4__
LAYOUT_AddChild, gow->objects[GID_OPTS_NOTIFY] = CheckBoxObject,
GA_ID, GID_OPTS_NOTIFY,
GA_RelVerify, TRUE,
@@ -1214,6 +1219,7 @@ void ami_gui_opts_open(void)
GA_Text, gadlab[GID_OPTS_NOTIFY],
GA_Selected, nsoption_bool(download_notify),
CheckBoxEnd,
+#endif
LayoutEnd,
LAYOUT_AddChild, gow->objects[GID_OPTS_DLDIR] = GetFileObject,
GA_ID, GID_OPTS_DLDIR,
@@ -1246,12 +1252,14 @@ void ami_gui_opts_open(void)
GA_Text, gadlab[GID_OPTS_CLOSE_NO_QUIT],
GA_Selected, nsoption_bool(close_no_quit),
CheckBoxEnd,
+#ifdef __amigaos4__
LAYOUT_AddChild, gow->objects[GID_OPTS_DOCKY] = CheckBoxObject,
GA_ID, GID_OPTS_DOCKY,
GA_RelVerify, TRUE,
GA_Text, gadlab[GID_OPTS_DOCKY],
GA_Selected, !nsoption_bool(hide_docky_icon),
CheckBoxEnd,
+#endif
LayoutEnd, // behaviour
CHILD_WeightedHeight, 0,
@@ -1294,12 +1302,14 @@ void ami_gui_opts_open(void)
LAYOUT_BevelStyle, BVS_GROUP,
LAYOUT_Label, gadlab[GRP_OPTS_MISC],
LAYOUT_SpaceOuter, TRUE,
+#ifdef __amigaos4__
LAYOUT_AddChild, gow->objects[GID_OPTS_CONTEXTMENU] = CheckBoxObject,
GA_ID, GID_OPTS_CONTEXTMENU,
GA_RelVerify, TRUE,
GA_Text, gadlab[GID_OPTS_CONTEXTMENU],
GA_Selected, nsoption_bool(context_menu),
CheckBoxEnd,
+#endif
LAYOUT_AddChild, gow->objects[GID_OPTS_FASTSCROLL] = CheckBoxObject,
GA_ID, GID_OPTS_FASTSCROLL,
GA_RelVerify, TRUE,
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 595ec0d..ace3c3b 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -707,6 +707,7 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma
if((GfxBase->LibNode.lib_Version >= 53) && (palette_mapped == false))
{
+#ifdef __amigaos4__
uint32 comptype = COMPOSITE_Src;
if(!bitmap->opaque)
comptype = COMPOSITE_Src_Over_Dest;
@@ -722,6 +723,7 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma
COMPTAG_OffsetX,x,
COMPTAG_OffsetY,y,
TAG_DONE);
+#endif
}
else
{
@@ -871,6 +873,7 @@ static void ami_bitmap_tile_hook(struct Hook *hook,struct RastPort *rp,struct Ba
if((GfxBase->LibNode.lib_Version >= 53) && (palette_mapped == false))
{
+#ifdef __amigaos4__
CompositeTags(COMPOSITE_Src_Over_Dest,bfbm->bm, rp->BitMap,
COMPTAG_Flags,COMPFLAG_IgnoreDestAlpha,
COMPTAG_DestX,bfmsg->Bounds.MinX,
@@ -882,6 +885,7 @@ static void ami_bitmap_tile_hook(struct Hook *hook,struct RastPort *rp,struct Ba
COMPTAG_OffsetX,xf,
COMPTAG_OffsetY,yf,
TAG_DONE);
+#endif
}
else
{
diff --git a/amiga/theme.c b/amiga/theme.c
index d0808a4..fa058e0 100644
--- a/amiga/theme.c
+++ b/amiga/theme.c
@@ -265,6 +265,7 @@ void ami_init_mouse_pointers(void)
mouseptrobj[i] = NULL;
char ptrfname[1024];
+#ifdef __amigaos4__
if(nsoption_bool(truecolour_mouse_pointers))
{
ami_get_theme_filename((char *)&ptrfname,ptrs32[i], false);
@@ -316,6 +317,7 @@ void ami_init_mouse_pointers(void)
}
}
}
+#endif
if(!mouseptrobj[i])
{