tracy/server/TracyBadVersion.hpp

40 lines
664 B
C++
Raw Normal View History

#ifndef __TRACYBADVERSION_HPP__
#define __TRACYBADVERSION_HPP__
2023-12-31 12:55:06 +00:00
#include <string>
#include "../public/common/TracyForceInline.hpp"
2022-07-02 14:25:47 +00:00
struct ImFont;
namespace tracy
{
2019-08-12 10:04:27 +00:00
struct BadVersionState
{
enum State
{
Ok,
BadFile,
2020-02-12 18:53:37 +00:00
ReadError,
2019-08-12 10:16:48 +00:00
UnsupportedVersion,
2023-12-31 12:55:06 +00:00
LegacyVersion,
LoadFailure
2019-08-12 10:04:27 +00:00
};
State state = Ok;
int version = 0;
2023-12-31 12:55:06 +00:00
std::string msg;
2019-08-12 10:04:27 +00:00
};
namespace detail
{
2021-11-13 21:20:00 +00:00
void BadVersionImpl( BadVersionState& badVer, ImFont* big );
}
2021-11-13 21:20:00 +00:00
tracy_force_inline void BadVersion( BadVersionState& badVer, ImFont* big ) { if( badVer.state != BadVersionState::Ok ) detail::BadVersionImpl( badVer, big ); }
}
#endif