mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 04:15:11 +00:00
gs-helper: Fix nonstandard usage of va_start
This commit is contained in:
parent
624bdda6a3
commit
1d9a4ddbf5
2 changed files with 4 additions and 4 deletions
|
@ -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<char> buffer(64);
|
||||
std::vector<char> buffer(128);
|
||||
|
||||
va_list vargs;
|
||||
va_start(vargs, format);
|
||||
size = vsnprintf(buffer.data(), buffer.size(), format.c_str(), vargs);
|
||||
size = static_cast<size_t>(vsnprintf(buffer.data(), buffer.size(), format, vargs));
|
||||
va_end(vargs);
|
||||
|
||||
_name = std::string(buffer.data(), buffer.data() + size);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue