summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscos/gui.c14
-rw-r--r--riscos/plotters.c17
2 files changed, 25 insertions, 6 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);
diff --git a/riscos/plotters.c b/riscos/plotters.c
index 81d12f3dd..00a75e6f5 100644
--- a/riscos/plotters.c
+++ b/riscos/plotters.c
@@ -66,6 +66,9 @@ int ro_plot_origin_x = 0;
int ro_plot_origin_y = 0;
float ro_plot_scale = 1.0;
+/** One version of the A9home OS is incapable of drawing patterned lines */
+bool ro_plot_patterned_lines = true;
+
bool ro_plot_clg(colour c)
{
@@ -140,12 +143,14 @@ bool ro_plot_path(const draw_path * const path, int width,
if (width < 1)
width = 1;
- if (dotted) {
- dash.elements[0] = 512 * width;
- dash_pattern = &dash;
- } else if (dashed) {
- dash.elements[0] = 1536 * width;
- dash_pattern = &dash;
+ if (ro_plot_patterned_lines) {
+ if (dotted) {
+ dash.elements[0] = 512 * width;
+ dash_pattern = &dash;
+ } else if (dashed) {
+ dash.elements[0] = 1536 * width;
+ dash_pattern = &dash;
+ }
}
error = xcolourtrans_set_gcol(c << 8, 0, os_ACTION_OVERWRITE, 0, 0);