diff --git a/source/obs/gs/gs-helper.cpp b/source/obs/gs/gs-helper.cpp index 1d49c8ab..99854d85 100644 --- a/source/obs/gs/gs-helper.cpp +++ b/source/obs/gs/gs-helper.cpp @@ -34,14 +34,14 @@ gs::context::~context() gs_debug_marker_begin(color, _name.c_str()); }*/ -gs::debug_marker::debug_marker(const float color[4], std::string format, ...) +gs::debug_marker::debug_marker(const float color[4], const char* format, ...) { size_t size; - std::vector buffer(64); + std::vector buffer(128); va_list vargs; va_start(vargs, format); - size = vsnprintf(buffer.data(), buffer.size(), format.c_str(), vargs); + size = static_cast(vsnprintf(buffer.data(), buffer.size(), format, vargs)); va_end(vargs); _name = std::string(buffer.data(), buffer.data() + size); diff --git a/source/obs/gs/gs-helper.hpp b/source/obs/gs/gs-helper.hpp index e8899767..b6ec46c9 100644 --- a/source/obs/gs/gs-helper.hpp +++ b/source/obs/gs/gs-helper.hpp @@ -50,7 +50,7 @@ namespace gs { public: //debug_marker(const float color[4], std::string name); - debug_marker(const float color[4], std::string format, ...); + debug_marker(const float color[4], const char* format, ...); ~debug_marker(); }; } // namespace gs