void *user_data)
{
ply_list_node_t *node;
-
+
+ loop->wakeup_time = PLY_EVENT_LOOP_NO_TIMED_WAKEUP;
+
node = ply_list_get_first_node (loop->timeout_watches);
while (node != NULL)
{
ply_list_remove_node (loop->timeout_watches, node);
free (timeout_watch);
}
+ else {
+ if (fabs (loop->wakeup_time - PLY_EVENT_LOOP_NO_TIMED_WAKEUP) <= 0)
+ loop->wakeup_time = timeout_watch->timeout;
+ else
+ loop->wakeup_time = MIN (loop->wakeup_time, timeout_watch->timeout);
+ }
node = next_node;
}
now = ply_get_timestamp ();
node = ply_list_get_first_node (loop->timeout_watches);
+ loop->wakeup_time=PLY_EVENT_LOOP_NO_TIMED_WAKEUP;
while (node != NULL)
{
ply_list_node_t *next_node;
free (watch);
ply_list_remove_node (loop->timeout_watches, node);
}
+ else {
+ if (fabs (loop->wakeup_time - PLY_EVENT_LOOP_NO_TIMED_WAKEUP) <= 0)
+ loop->wakeup_time = watch->timeout;
+ else
+ loop->wakeup_time = MIN (loop->wakeup_time, watch->timeout);
+ }
node = next_node;
}
- if (ply_list_get_length (loop->timeout_watches) == 0)
- loop->wakeup_time = PLY_EVENT_LOOP_NO_TIMED_WAKEUP;
}
static void
#include <linux/kd.h>
#ifndef FRAMES_PER_SECOND
-#define FRAMES_PER_SECOND 20
+#define FRAMES_PER_SECOND 50
#endif
-#define FLARE_FRAMES_PER_SECOND 10
+#define FLARE_FRAMES_PER_SECOND 25
#define FLARE_COUNT 60
#define FLARE_LINE_COUNT 4
-#define HALO_BLUR 6
+#define HALO_BLUR 4
/*you can comment one or both of these out*/
/*#define SHOW_PLANETS */
ply_frame_buffer_get_size (plugin->frame_buffer, &area);
plugin->now = ply_get_timestamp ();
- ply_event_loop_watch_for_timeout (plugin->loop,
- 1.0 / FRAMES_PER_SECOND,
- (ply_event_loop_timeout_handler_t)
- on_timeout, plugin);
-
setup_solar (plugin);
on_timeout (plugin);
ply_window_draw_area (plugin->window, area.x, area.y, area.width, area.height);
for (subx=min_x; subx<max_x; subx++){
for (suby=min_y; suby<max_y; suby++){
uint32_t pixel = orig_image_data[x+subx+x_offset + (y+suby+y_offset) * orig_width];
- float current = 1-(sqrt((subx*subx)+(suby*suby))+1)/(distance+3);
+ float current = 1-(sqrt((subx*subx)+(suby*suby))+1)/(distance+2);
current*=pixel>>24;
if (current>best) best=current;
}