2018-04-21 21:19:48 +00:00
|
|
|
#ifndef __TRACYBADVERSION_HPP__
|
|
|
|
#define __TRACYBADVERSION_HPP__
|
|
|
|
|
|
|
|
#include "../common/TracyForceInline.hpp"
|
|
|
|
|
2022-07-02 14:25:47 +00:00
|
|
|
struct ImFont;
|
|
|
|
|
2018-04-21 21:19:48 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2018-04-21 21:19:48 +00:00
|
|
|
namespace detail
|
|
|
|
{
|
2021-11-13 21:20:00 +00:00
|
|
|
void BadVersionImpl( BadVersionState& badVer, ImFont* big );
|
2018-04-21 21:19:48 +00:00
|
|
|
}
|
|
|
|
|
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 ); }
|
2018-04-21 21:19:48 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|