diff options
author | Adrian Lees <adrian@aemulor.com> | 2005-09-14 19:08:48 +0000 |
---|---|---|
committer | Adrian Lees <adrian@aemulor.com> | 2005-09-14 19:08:48 +0000 |
commit | 14d159f067f084ce807f4fa0d4666661c9b90dff (patch) | |
tree | db33d9bcdbb57cb27cab974a93a75be83c91cb2f /riscos/buffer.c | |
parent | de8b91ca2692008bac35fd81f16e99f1cb810100 (diff) | |
download | netsurf-14d159f067f084ce807f4fa0d4666661c9b90dff.tar.gz netsurf-14d159f067f084ce807f4fa0d4666661c9b90dff.tar.bz2 |
[project @ 2005-09-14 19:08:48 by adrianl]
Correct mode word of sprite that buffers output
svn path=/import/netsurf/; revision=1864
Diffstat (limited to 'riscos/buffer.c')
-rw-r--r-- | riscos/buffer.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/riscos/buffer.c b/riscos/buffer.c index ec87f69eb..b062e13cb 100644 --- a/riscos/buffer.c +++ b/riscos/buffer.c @@ -133,6 +133,34 @@ void ro_gui_buffer_open(wimp_draw *redraw) { ro_gui_buffer_free(); return; } + + /* if we're not in a numbered screen mode then we need + to build a suitable sprite mode word */ + if (mode >= (os_mode)0x100) { + const os_VDU_VAR_LIST(4) vars = { + { os_MODEVAR_LOG2_BPP, + os_MODEVAR_XEIG_FACTOR, + os_MODEVAR_YEIG_FACTOR, + os_VDUVAR_END_LIST } + }; + int xeig, yeig; + int vals[4]; + int type; + + error = xos_read_vdu_variables((const os_vdu_var_list*)&vars, vals); + if (error) { + LOG(("Error reading mode properties '%s'", error->errmess)); + ro_gui_buffer_free(); + return; + } + + type = 1 + vals[0]; + xeig = vals[1]; + yeig = vals[2]; + + mode = (os_mode)((type << 27) | ((180 >> yeig) << 14) | + ((180 >> xeig) << 1) | 1); + } } #endif |