mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
better random
This commit is contained in:
parent
8a4f8284b1
commit
5f50068fcd
@ -723,11 +723,14 @@ static void c_initialize_firsttime()
|
||||
}
|
||||
|
||||
void c_read_random() {
|
||||
random_value = (unsigned char)(rand() >> 8);
|
||||
static unsigned int seed=0;
|
||||
if (!seed) {
|
||||
seed = time(NULL);
|
||||
}
|
||||
random_value = (unsigned char)rand_r(&seed);
|
||||
}
|
||||
|
||||
static void cpu_thread(void *dummyptr) {
|
||||
|
||||
do
|
||||
{
|
||||
cpu65_run();
|
||||
|
Loading…
x
Reference in New Issue
Block a user