mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-22 02:27:01 +08:00
feat(world): add thread pool size management and UI controls
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user