Gitweb links:
...log
http://git.netsurf-browser.org/libnsfb.git/shortlog/726d71d88bf9d96ade702992a7625ff56dcfac78
...commit
http://git.netsurf-browser.org/libnsfb.git/commit/726d71d88bf9d96ade702992a7625ff56dcfac78
...tree
http://git.netsurf-browser.org/libnsfb.git/tree/726d71d88bf9d96ade702992a7625ff56dcfac78
The branch, ashmew2/kolibri has been updated
via 726d71d88bf9d96ade702992a7625ff56dcfac78 (commit)
from 46fe390b976c932dd786becf40a42c4f95053365 (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/libnsfb.git/commit/?id=726d71d88bf9d96ade702992a7625ff56dcfac78
commit 726d71d88bf9d96ade702992a7625ff56dcfac78
Author: Ashish Gupta <[email protected]>
Commit: Ashish Gupta <[email protected]>
Never wait indefinitely (as this messes with the Network Stack events via
the content/fetcher)
diff --git a/src/surface/kolibri.c b/src/surface/kolibri.c
index 25b59e1..d1b5d4c 100644
--- a/src/surface/kolibri.c
+++ b/src/surface/kolibri.c
@@ -53,13 +53,6 @@ int kolibri_get_button_id(void)
}
}
-int kolibri_wait_for_event(void)
-{
- uint32_t __ret;
- __asm__ __volatile__ ("int $0x40":"=a"(__ret):"0"(10));
- return __ret;
-}
-
int kolibri_get_pressed_key(void)
{
uint16_t __ret;
@@ -243,8 +236,7 @@ static int kolibri_surface_initialise(nsfb_t *nsfb)
EVENT_BUTTON |
EVENT_MOUSE_CHANGE |
EVENT_INACTIVE_NO_CURSOR |
- EVENT_INACTIVE_NO_MOUSE |
- EVENT_NETWORK);
+ EVENT_INACTIVE_NO_MOUSE);
return 0;
}
@@ -364,19 +356,19 @@ int ispowerkey(int scancode)
}
static bool kolibri_surface_input(nsfb_t *nsfb, nsfb_event_t *event,
- int timeout)
+ int timeout)
{
int got_event;
static int scanfull = 0;
char event_num[20];
+
nsfb = nsfb; /* unused */
+ /* schedule_run from gui.c might have returned negative for wait forever.
This stalls us completely for network etc.
+ Don't do that. Always try to yield back to scheduler asap */
- if (timeout >= 0) {
- got_event = kolibri_wait_for_event_with_timeout(timeout / 10);
- } else {
- got_event = kolibri_wait_for_event();
- }
+ if(timeout < 0) timeout = 100; /* millis */
+ got_event = kolibri_wait_for_event_with_timeout(timeout / 10);
if (got_event == 0) {
return false;
-----------------------------------------------------------------------
Summary of changes:
src/surface/kolibri.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/surface/kolibri.c b/src/surface/kolibri.c
index 25b59e1..d1b5d4c 100644
--- a/src/surface/kolibri.c
+++ b/src/surface/kolibri.c
@@ -53,13 +53,6 @@ int kolibri_get_button_id(void)
}
}
-int kolibri_wait_for_event(void)
-{
- uint32_t __ret;
- __asm__ __volatile__ ("int $0x40":"=a"(__ret):"0"(10));
- return __ret;
-}
-
int kolibri_get_pressed_key(void)
{
uint16_t __ret;
@@ -243,8 +236,7 @@ static int kolibri_surface_initialise(nsfb_t *nsfb)
EVENT_BUTTON |
EVENT_MOUSE_CHANGE |
EVENT_INACTIVE_NO_CURSOR |
- EVENT_INACTIVE_NO_MOUSE |
- EVENT_NETWORK);
+ EVENT_INACTIVE_NO_MOUSE);
return 0;
}
@@ -364,19 +356,19 @@ int ispowerkey(int scancode)
}
static bool kolibri_surface_input(nsfb_t *nsfb, nsfb_event_t *event,
- int timeout)
+ int timeout)
{
int got_event;
static int scanfull = 0;
char event_num[20];
+
nsfb = nsfb; /* unused */
+ /* schedule_run from gui.c might have returned negative for wait forever.
This stalls us completely for network etc.
+ Don't do that. Always try to yield back to scheduler asap */
- if (timeout >= 0) {
- got_event = kolibri_wait_for_event_with_timeout(timeout / 10);
- } else {
- got_event = kolibri_wait_for_event();
- }
+ if(timeout < 0) timeout = 100; /* millis */
+ got_event = kolibri_wait_for_event_with_timeout(timeout / 10);
if (got_event == 0) {
return false;
--
NetSurf Framebuffer library
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org