This commit is contained in:
dijunkun
2024-07-18 15:58:28 +08:00
parent 20bb13ce85
commit 3111b3a641
6 changed files with 15 additions and 14 deletions

1
icon/app.rc Normal file
View File

@@ -0,0 +1 @@
IDI_ICON1 ICON "app_icon.ico"

BIN
icon/app_icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -424,19 +424,19 @@ int Render::Run() {
ImGui_ImplSDLRenderer2_RenderDrawData(ImGui::GetDrawData());
SDL_RenderPresent(main_renderer_);
frame_count_++;
end_time_ = SDL_GetTicks();
elapsed_time_ = end_time_ - start_time_;
if (elapsed_time_ >= 1000) {
fps_ = frame_count_ / (elapsed_time_ / 1000);
frame_count_ = 0;
window_title = "Remote Desk Client FPS [" + std::to_string(fps_) +
"] status [" + connection_status_str_ + "|" +
connection_status_str_ + "]";
// For MacOS, UI frameworks can only be called from the main thread
SDL_SetWindowTitle(main_window_, window_title.c_str());
start_time_ = end_time_;
}
// frame_count_++;
// end_time_ = SDL_GetTicks();
// elapsed_time_ = end_time_ - start_time_;
// if (elapsed_time_ >= 1000) {
// fps_ = frame_count_ / (elapsed_time_ / 1000);
// frame_count_ = 0;
// window_title = "Remote Desk Client FPS [" + std::to_string(fps_) +
// "] status [" + connection_status_str_ + "|" +
// connection_status_str_ + "]";
// // For MacOS, UI frameworks can only be called from the main thread
// SDL_SetWindowTitle(main_window_, window_title.c_str());
// start_time_ = end_time_;
// }
}
// Cleanup

View File

@@ -133,7 +133,7 @@ target("remote_desk")
elseif is_os("linux") then
add_packages("ffmpeg")
end
add_files("src/gui/main.cpp")
add_files("src/gui/main.cpp", "icon/app.rc")
-- target("screen_capturer")
-- set_kind("binary")