Explorar o código

Minor improvement.

jcsyshc %!s(int64=2) %!d(string=hai) anos
pai
achega
60145583e9
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 2 2
      src/cuda_helper.hpp
  2. 2 2
      src/main.cpp

+ 2 - 2
src/cuda_helper.hpp

@@ -18,7 +18,7 @@ inline bool check_cuda_api_call(CUresult api_ret, unsigned int line_number,
     if (ret != CUDA_SUCCESS) [[unlikely]] error_str = "Unknown";
     SPDLOG_ERROR("CUDA api call {} failed at {}:{} with error 0x{:x}:{}, {}.",
                  api_call_str, file_name, line_number,
-                 api_ret, error_name, error_str);
+                 (int) api_ret, error_name, error_str);
     RET_ERROR;
 }
 
@@ -26,7 +26,7 @@ inline bool check_cuda_api_call(cudaError api_ret, unsigned int line_number,
                                 const char *file_name, const char *api_call_str) {
     if (api_ret == cudaSuccess) [[likely]] return true;
     SPDLOG_ERROR("CUDA api call {} failed at {}:{} with error 0x{:x}.",
-                 api_call_str, file_name, line_number, api_ret);
+                 api_call_str, file_name, line_number, (int) api_ret);
     RET_ERROR;
 }
 

+ 2 - 2
src/main.cpp

@@ -57,7 +57,7 @@ void controller_main(const char *this_name) {
         ImGui_ImplGlfw_NewFrame();
         ImGui::NewFrame();
 
-        ImGui::ShowDemoWindow();
+//        ImGui::ShowDemoWindow();
 
         if (ImGui::Begin("TinyPlayer Control")) {
             // action
@@ -92,7 +92,7 @@ void controller_main(const char *this_name) {
             if (ImGui::BeginCombo("Monitor", monitor_name_preview)) { // let user select monitors
                 for (int k = 0; k < monitor_count; ++k) {
                     auto is_selected = (monitor_index == k);
-                    auto monitor_name = fmt::format("{} - {}", k, glfwGetMonitorName(monitors[k]));
+                    auto monitor_name = std::format("{} - {}", k, glfwGetMonitorName(monitors[k]));
                     if (ImGui::Selectable(monitor_name.c_str(), is_selected)) {
                         monitor_index = k;
                     }