summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2023-12-03 19:06:32 -0500
committerRay Strode <rstrode@redhat.com>2023-12-04 05:48:06 -0500
commit0628f3b6e27e4827505cc53385e4e26f0452e54f (patch)
tree6d4561be45d3b2e2d59bd5a1b739cb385520d09c
parent67204063f9311ebb6b86f59ac5af16605c307ef7 (diff)
fade-throbber: Use new ply_get_random_number function
-rw-r--r--src/plugins/splash/fade-throbber/plugin.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/splash/fade-throbber/plugin.c b/src/plugins/splash/fade-throbber/plugin.c
index 18ad72e9..4b423f71 100644
--- a/src/plugins/splash/fade-throbber/plugin.c
+++ b/src/plugins/splash/fade-throbber/plugin.c
@@ -186,7 +186,6 @@ create_plugin (ply_key_file_t *key_file)
ply_boot_splash_plugin_t *plugin;
char *image_dir, *image_path;
- srand ((int) ply_get_timestamp ());
plugin = calloc (1, sizeof(ply_boot_splash_plugin_t));
plugin->start_time = 0.0;
@@ -927,8 +926,8 @@ view_add_star (view_t *view)
node = NULL;
do {
- x = rand () % screen_width;
- y = rand () % screen_height;
+ x = ply_get_random_number (0, screen_width);
+ y = ply_get_random_number (0, screen_height);
if ((x <= logo_area.x + logo_area.width)
&& (x >= logo_area.x)
@@ -965,7 +964,7 @@ view_add_star (view_t *view)
}
} while (node != NULL);
- star = star_new (x, y, (double) ((rand () % 50) + 1));
+ star = star_new (x, y, (double) ((ply_get_random_number (0, 50)) + 1));
ply_list_append_data (view->stars, star);
}