feat(world): add thread pool size management and UI controls

This commit is contained in:
2026-06-21 16:59:11 +08:00
parent 34d9439466
commit 4f6c5303ec
4 changed files with 30 additions and 6 deletions

View File

@@ -48,6 +48,7 @@ private:
int m_pre_set_tick_speed = 1;
bool m_tick_frezze = false;
int m_samples_idx = 1;
int m_threads = 1;
void show_about_table_bar();
void show_biome_table_bar();
void show_time_table_bar();

View File

@@ -82,7 +82,8 @@ private:
std::atomic<bool> m_tick_running{true};
std::atomic<int> m_rendering_distance{24};
std::atomic<float> m_chunk_gen_fraction{0.0f};
std::atomic<int> m_pool_threads{1};
std::atomic<int> m_max_threads{1};
std::atomic<TickType> m_game_ticks{0};
std::vector<ChunkPos> m_dirty_queue;
@@ -159,7 +160,8 @@ public:
bool is_tick_running() const;
void tick_running(bool run);
int pool_threads() const;
int max_threads() const;
void change_pool_threads(int threads);
};