diff options
author | Adrian Lees <adrian@aemulor.com> | 2006-07-16 16:52:28 +0000 |
---|---|---|
committer | Adrian Lees <adrian@aemulor.com> | 2006-07-16 16:52:28 +0000 |
commit | 81512fa939c2cfa759b80a48a89f39fdc5238cd4 (patch) | |
tree | 2e95588d527bb7d52c1dcf9f4ddf82c38b19c752 /riscos/gui.c | |
parent | 2c4fb5d683777f48c62ca3e1bf1bc0a86f4e5f98 (diff) | |
download | netsurf-81512fa939c2cfa759b80a48a89f39fdc5238cd4.tar.gz netsurf-81512fa939c2cfa759b80a48a89f39fdc5238cd4.tar.bz2 |
Workaround for A9home crash drawing patterned lines; maybe temporary
svn path=/trunk/netsurf/; revision=2768
Diffstat (limited to 'riscos/gui.c')
-rw-r--r-- | riscos/gui.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index 808682f9e..6cd8c7715 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -30,6 +30,7 @@ #include "oslib/osfile.h" #include "oslib/osfscontrol.h" #include "oslib/osgbpb.h" +#include "oslib/osmodule.h" #include "oslib/osspriteop.h" #include "oslib/pdriver.h" #include "oslib/plugin.h" @@ -125,6 +126,8 @@ #define FILETYPE_ARTWORKS 0xd94 #endif +extern bool ro_plot_patterned_lines; + int os_version = 0; const char * const __dynamic_da_name = "NetSurf"; /**< For UnixLib. */ @@ -276,6 +279,7 @@ void gui_init(int argc, char** argv) os_error *error; int length; char *nsdir_temp; + byte *base; /* re-enable all FPU exceptions/traps except inexact operations, * which we're not interested in, and underflow which is incorrectly @@ -292,6 +296,16 @@ void gui_init(int argc, char** argv) * being present) */ xos_byte(osbyte_IN_KEY, 0, 0xff, &os_version, NULL); + /* the first release version of the A9home OS is incapable of + plotting patterned lines (presumably a fault in the hw acceleration) */ + if (!xosmodule_lookup("VideoHWSMI", NULL, NULL, &base, NULL, NULL)) { + const char *help = (char*)base + ((int*)base)[5]; + while (*help > 9) help++; + while (*help == 9) help++; + if (!memcmp(help, "0.55", 4)) + ro_plot_patterned_lines = false; + } + atexit(ro_gui_cleanup); prev_sigs.sigabrt = signal(SIGABRT, ro_gui_signal); prev_sigs.sigfpe = signal(SIGFPE, ro_gui_signal); |