tracy/server/TracyBadVersion.hpp

35 lines
599 B
C++
Raw Normal View History

#ifndef __TRACYBADVERSION_HPP__
#define __TRACYBADVERSION_HPP__
2021-11-13 21:20:00 +00:00
#include <imgui.h>
#include "../common/TracyForceInline.hpp"
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,
LegacyVersion
2019-08-12 10:04:27 +00:00
};
State state = Ok;
int version = 0;
};
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