remove srand calls

This commit is contained in:
MX 2022-11-10 07:07:35 +03:00
parent 684fdc632f
commit 1657604eb2
No known key found for this signature in database
GPG Key ID: 6C4C311DFD4B4AB5
4 changed files with 0 additions and 6 deletions

View File

@ -370,8 +370,6 @@ static void arkanoid_update_timer_callback(FuriMessageQueue* event_queue) {
int32_t arkanoid_game_app(void* p) { int32_t arkanoid_game_app(void* p) {
UNUSED(p); UNUSED(p);
int32_t return_code = 0; int32_t return_code = 0;
// Set random seed from interrupts
srand(DWT->CYCCNT);
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(GameEvent)); FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(GameEvent));

View File

@ -436,7 +436,6 @@ static void game_event_handler(GameEvent const event) {
} }
static void game_alloc() { static void game_alloc() {
srand(DWT->CYCCNT);
key_stack_init(); key_stack_init();
notification = furi_record_open(RECORD_NOTIFICATION); notification = furi_record_open(RECORD_NOTIFICATION);
notification_message_block(notification, &sequence_display_backlight_enforce_on); notification_message_block(notification, &sequence_display_backlight_enforce_on);

View File

@ -500,7 +500,6 @@ static void heap_defense_timer_callback(FuriMessageQueue* event_queue) {
int32_t heap_defence_app(void* p) { int32_t heap_defence_app(void* p) {
UNUSED(p); UNUSED(p);
srand(DWT->CYCCNT);
//FURI_LOG_W(TAG, "Heap defence start %d", __LINE__); //FURI_LOG_W(TAG, "Heap defence start %d", __LINE__);
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(GameEvent)); FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(GameEvent));

View File

@ -345,8 +345,6 @@ static void
} }
int32_t tetris_game_app() { int32_t tetris_game_app() {
srand(DWT->CYCCNT);
FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(TetrisEvent)); FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(TetrisEvent));
TetrisState* tetris_state = malloc(sizeof(TetrisState)); TetrisState* tetris_state = malloc(sizeof(TetrisState));