2018-04-21 21:19:48 +00:00
|
|
|
#ifndef __TRACYBADVERSION_HPP__
|
|
|
|
#define __TRACYBADVERSION_HPP__
|
|
|
|
|
2023-12-31 12:55:06 +00:00
|
|
|
#include <string>
|
|
|
|
|
2022-07-17 11:41:40 +00:00
|
|
|
#include "../public/common/TracyForceInline.hpp"
|
2018-04-21 21:19:48 +00:00
|
|
|
|
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,
|
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
|
|
|
};
|
|
|
|
|
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
|