diff --git a/ext/OSCPack/ip/IpEndpointName.cpp b/ext/OSCPack/ip/IpEndpointName.cpp index 556da3a..03bf14d 100644 --- a/ext/OSCPack/ip/IpEndpointName.cpp +++ b/ext/OSCPack/ip/IpEndpointName.cpp @@ -49,10 +49,10 @@ unsigned long IpEndpointName::GetHostByName( const char *s ) void IpEndpointName::AddressAsString( char *s ) const { - if( address == ANY_ADDRESS ){ - std::sprintf( s, "" ); + if( address == ANY_ADDRESS ){ + std::snprintf( s, IpEndpointName::ADDRESS_STRING_LENGTH, "" ); }else{ - std::sprintf( s, "%d.%d.%d.%d", + std::snprintf( s, IpEndpointName::ADDRESS_STRING_LENGTH, "%d.%d.%d.%d", (int)((address >> 24) & 0xFF), (int)((address >> 16) & 0xFF), (int)((address >> 8) & 0xFF), @@ -65,9 +65,9 @@ void IpEndpointName::AddressAndPortAsString( char *s ) const { if( port == ANY_PORT ){ if( address == ANY_ADDRESS ){ - std::sprintf( s, ":" ); + std::snprintf( s, IpEndpointName::ADDRESS_AND_PORT_STRING_LENGTH, ":" ); }else{ - std::sprintf( s, "%d.%d.%d.%d:", + std::snprintf( s, IpEndpointName::ADDRESS_AND_PORT_STRING_LENGTH, "%d.%d.%d.%d:", (int)((address >> 24) & 0xFF), (int)((address >> 16) & 0xFF), (int)((address >> 8) & 0xFF), @@ -75,9 +75,9 @@ void IpEndpointName::AddressAndPortAsString( char *s ) const } }else{ if( address == ANY_ADDRESS ){ - std::sprintf( s, ":%d", port ); + std::snprintf( s, IpEndpointName::ADDRESS_AND_PORT_STRING_LENGTH, ":%d", port ); }else{ - std::sprintf( s, "%d.%d.%d.%d:%d", + std::snprintf( s, IpEndpointName::ADDRESS_AND_PORT_STRING_LENGTH, "%d.%d.%d.%d:%d", (int)((address >> 24) & 0xFF), (int)((address >> 16) & 0xFF), (int)((address >> 8) & 0xFF), diff --git a/src/ControlManager.cpp b/src/ControlManager.cpp index ff19ab3..d079132 100644 --- a/src/ControlManager.cpp +++ b/src/ControlManager.cpp @@ -1275,7 +1275,12 @@ void Control::keyboardCalback(GLFWwindow* w, int key, int, int action, int mods) } Control::manager().input_access_.unlock(); } +#if defined(APPLE) + else if ( w != Rendering::manager().mainWindow().window() && + key == GLFW_KEY_F && action == GLFW_PRESS && mods == GLFW_MOD_SUPER ) +#else else if ( key == GLFW_KEY_F && action == GLFW_PRESS && mods == GLFW_MOD_CONTROL ) +#endif { Rendering::manager().window(w)->toggleFullscreen(); } diff --git a/src/ImGuiToolkit.cpp b/src/ImGuiToolkit.cpp index a3c3280..9c88edf 100644 --- a/src/ImGuiToolkit.cpp +++ b/src/ImGuiToolkit.cpp @@ -1023,7 +1023,7 @@ void ImGuiToolkit::RenderTimelineBPM (ImVec2 min_bbox, ImVec2 max_bbox, double t { // beat count label guint64 ticklabel = tick / time_beat; - ImFormatString(text_buf, IM_ARRAYSIZE(text_buf), "%ld", ticklabel); + ImFormatString(text_buf, IM_ARRAYSIZE(text_buf), "%lu", (unsigned long) ticklabel); ImVec2 label_size = ImGui::CalcTextSize(text_buf, NULL); ImVec2 mini = ImVec2( pos.x - label_size.x / 2.f, pos.y); ImVec2 maxi = ImVec2( pos.x + label_size.x / 2.f, pos.y); diff --git a/src/PickingVisitor.cpp b/src/PickingVisitor.cpp index 95f075d..50dfb78 100644 --- a/src/PickingVisitor.cpp +++ b/src/PickingVisitor.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include "Decorations.h" diff --git a/src/Shader.cpp b/src/Shader.cpp index 196cc21..2bc8329 100644 --- a/src/Shader.cpp +++ b/src/Shader.cpp @@ -29,7 +29,6 @@ #include #define GLM_ENABLE_EXPERIMENTAL -#include #include "Resource.h" #include "Log.h" diff --git a/src/TimerMetronomeWindow.cpp b/src/TimerMetronomeWindow.cpp index a4ca72f..76d5282 100644 --- a/src/TimerMetronomeWindow.cpp +++ b/src/TimerMetronomeWindow.cpp @@ -299,7 +299,7 @@ void TimerMetronomeWindow::Render() ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); guint64 lap = (time_-start_time_hand_)/duration_hand_; - snprintf(text_buf, 24, "%ld turn%s", lap, lap > 1 ? "s" : " " ); + snprintf(text_buf, 24, "%lu turn%s", (unsigned long) lap, lap > 1 ? "s" : " " ); label_size = ImGui::CalcTextSize(text_buf, NULL); ImGui::SetCursorScreenPos(circle_center + ImVec2(0.f, circle_radius * -0.7f) - label_size/2); ImGui::Text("%s", text_buf); diff --git a/src/UserInterfaceManager.cpp b/src/UserInterfaceManager.cpp index d6e1cb1..f9e69ea 100644 --- a/src/UserInterfaceManager.cpp +++ b/src/UserInterfaceManager.cpp @@ -22,6 +22,7 @@ #define WINDOW_TOOLBOX_DIST_TO_BORDER 10.f #include +#include #include #include #include @@ -3545,7 +3546,7 @@ void Navigator::RenderNewPannel() ImGui::Text("Codec :");ImGui::SameLine(150); ImGui::Text("%s", VideoRecorder::profile_name[ _video_recorder.profile() ] ); ImGui::Text("Frames :");ImGui::SameLine(150); - ImGui::Text("%ld / %ld", _video_recorder.numFrames(), _video_recorder.files().size() ); + ImGui::Text("%lu / %lu", (unsigned long)_video_recorder.numFrames(), _video_recorder.files().size() ); ImGui::Spacing(); ImGui::ProgressBar(_video_recorder.progress());