Summary: | Ability to seed Math.Random () | ||
---|---|---|---|
Product: | plymouth | Reporter: | dendlerdev |
Component: | general | Assignee: | Ray Strode [halfline] <rstrode> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | medium | CC: | arfbtwn, rstrode |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Working Seed |
Description
dendlerdev
2011-11-05 13:32:11 UTC
should be set in master: http://cgit.freedesktop.org/plymouth/commit/?id=3f8bd998dcc6d592ffd5d3aefad06f0bbf28a725 script: seed random number generator Most splash plugins that use random numbers seed the random number generator with the current time, but script fails, too. This commit fixes that. https://bugs.freedesktop.org/show_bug.cgi?id=42632 Created attachment 104777 [details] [review] Working Seed Hi, I've been developing a script that uses the Math.Random function to select a splash screen but it always selects the same image. I'm not exactly sure what the problem is but believe that it lies in the cast from double to int performed when feeding the output of ply_get_timestamp to srand. I enclose a small patch that corrects the behaviour for scripts, but I noticed using grep that the generator is seeded in the same way throughout plymouth. Thanks! |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.