Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/407e20578ff0b8c2b3fa534f82b4cf139e914ee0
...commit
http://git.netsurf-browser.org/netsurf.git/commit/407e20578ff0b8c2b3fa534f82b4cf139e914ee0
...tree
http://git.netsurf-browser.org/netsurf.git/tree/407e20578ff0b8c2b3fa534f82b4cf139e914ee0
The branch, master has been updated
via 407e20578ff0b8c2b3fa534f82b4cf139e914ee0 (commit)
from 9f3d0126503d0f22ffa6cd3d0d9d907d8d400595 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=407e20578ff0b8c2b3fa534f82b4cf139e914ee0
commit 407e20578ff0b8c2b3fa534f82b4cf139e914ee0
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
RISC OS: GUI: Clean up alpha sprite support test.
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index 3f2a212..f9268ca 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -1112,9 +1112,11 @@ static void ro_gui_check_resolvers(void)
}
/**
- * Set global variable for whether the OS version supports alpha channels.
+ * Determine whether the OS version supports alpha channels.
+ *
+ * \return true iff alpha channels are supported, false otherwise.
*/
-static void ro_gui__check_os_alpha_sprites(void)
+static bool ro_gui__os_alpha_sprites_supported(void)
{
os_error *error;
int var_val;
@@ -1126,17 +1128,10 @@ static void ro_gui__check_os_alpha_sprites(void)
if (error) {
NSLOG(netsurf, ERROR, "xos_read_mode_variable: 0x%x: %s",
error->errnum, error->errmess);
- return;
- }
-
- if (var_val == (1 << 15)) {
- os_alpha_sprite_supported = true;
- } else {
- os_alpha_sprite_supported = false;
+ return false;
}
- NSLOG(netsurf, INFO, "OS supports alpha sprites: %s (%i)",
- os_alpha_sprite_supported ? "yes" : "no", var_val);
+ return (var_val == (1 << 15));
}
/**
@@ -1179,7 +1174,10 @@ static nserror gui_init(int argc, char** argv)
* (remember that it's preferable to check for specific features
* being present) */
xos_byte(osbyte_IN_KEY, 0, 0xff, &os_version, NULL);
- ro_gui__check_os_alpha_sprites();
+
+ os_alpha_sprite_supported = ro_gui__os_alpha_sprites_supported();
+ NSLOG(netsurf, INFO, "OS supports alpha sprites: %s",
+ os_alpha_sprite_supported ? "yes" : "no");
/* the first release version of the A9home OS is incapable of
plotting patterned lines (presumably a fault in the hw acceleration)
*/
-----------------------------------------------------------------------
Summary of changes:
frontends/riscos/gui.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index 3f2a212..f9268ca 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -1112,9 +1112,11 @@ static void ro_gui_check_resolvers(void)
}
/**
- * Set global variable for whether the OS version supports alpha channels.
+ * Determine whether the OS version supports alpha channels.
+ *
+ * \return true iff alpha channels are supported, false otherwise.
*/
-static void ro_gui__check_os_alpha_sprites(void)
+static bool ro_gui__os_alpha_sprites_supported(void)
{
os_error *error;
int var_val;
@@ -1126,17 +1128,10 @@ static void ro_gui__check_os_alpha_sprites(void)
if (error) {
NSLOG(netsurf, ERROR, "xos_read_mode_variable: 0x%x: %s",
error->errnum, error->errmess);
- return;
- }
-
- if (var_val == (1 << 15)) {
- os_alpha_sprite_supported = true;
- } else {
- os_alpha_sprite_supported = false;
+ return false;
}
- NSLOG(netsurf, INFO, "OS supports alpha sprites: %s (%i)",
- os_alpha_sprite_supported ? "yes" : "no", var_val);
+ return (var_val == (1 << 15));
}
/**
@@ -1179,7 +1174,10 @@ static nserror gui_init(int argc, char** argv)
* (remember that it's preferable to check for specific features
* being present) */
xos_byte(osbyte_IN_KEY, 0, 0xff, &os_version, NULL);
- ro_gui__check_os_alpha_sprites();
+
+ os_alpha_sprite_supported = ro_gui__os_alpha_sprites_supported();
+ NSLOG(netsurf, INFO, "OS supports alpha sprites: %s",
+ os_alpha_sprite_supported ? "yes" : "no");
/* the first release version of the A9home OS is incapable of
plotting patterned lines (presumably a fault in the hw acceleration)
*/
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]