working restart button

This commit is contained in:
Priec
2025-12-14 17:29:33 +01:00
parent e5091a33e7
commit 786ead2ffa

View File

@@ -26,8 +26,6 @@ constexpr int PLAYER_X = 29;
constexpr int PLAYER_Y = 6;
constexpr int STACK_SIZE = 4096;
Thread logic_thread(osPriorityNormal, STACK_SIZE);
Thread render_thread(osPriorityNormal, STACK_SIZE);
void logic_loop(void *arg) {
int speed = *(int *)arg;
MovementState player_state;
@@ -189,6 +187,9 @@ void render_loop(int speed) {
int *speed_ptr = new int(speed);
Thread logic_thread(osPriorityNormal, STACK_SIZE);
Thread render_thread(osPriorityNormal, STACK_SIZE);
logic_thread.start(callback(logic_loop, (void *)speed_ptr));
render_thread.start(render_loop_thread);