修复在macos的链接问题
This commit is contained in:
parent
88e74fc18c
commit
5afaa8d781
@ -15,12 +15,6 @@ arona_application::arona_application() {
|
||||
g_application = this;
|
||||
}
|
||||
|
||||
bool update_window_manager() {
|
||||
g_main_thread_hub.process_messages();
|
||||
get_window_manager()->update();
|
||||
return true;
|
||||
}
|
||||
|
||||
void arona_application::init() {
|
||||
application::init();
|
||||
// Get the screen refresh rate
|
||||
@ -34,12 +28,13 @@ void arona_application::init() {
|
||||
screen_refresh_rate_ = std::max(screen_refresh_rate_, monitor->get_refresh_rate());
|
||||
}
|
||||
screen_refresh_rate_ /= 1000; // Convert to Hz
|
||||
// 在macos上可能无法获取屏幕刷新率
|
||||
if (screen_refresh_rate_ == 0) {
|
||||
screen_refresh_rate_ = 120;
|
||||
spdlog::error("Failed to get screen refresh rate, using default value {} Hz", screen_refresh_rate_);
|
||||
}
|
||||
spdlog::info("Screen refresh rate: {} Hz", screen_refresh_rate_);
|
||||
timer_ = Glib::signal_idle().connect(&update_window_manager);
|
||||
timer_ = Glib::signal_idle().connect(sigc::mem_fun(*this, &arona_application::update_window_manager));
|
||||
// timer_ = Glib::signal_timeout().connect(&update_window_manager, 0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user