mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Push IsBusy() callback to Backend.
This commit is contained in:
parent
9f9cd04761
commit
5b2cce0a02
@ -11,7 +11,7 @@ class RunQueue;
|
|||||||
class Backend
|
class Backend
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Backend( const char* title, const std::function<void()>& redraw, const std::function<void(float)>& scaleChanged, RunQueue* mainThreadTasks );
|
Backend( const char* title, const std::function<void()>& redraw, const std::function<void(float)>& scaleChanged, const std::function<int(void)>& isBusy, RunQueue* mainThreadTasks );
|
||||||
~Backend();
|
~Backend();
|
||||||
|
|
||||||
void Show();
|
void Show();
|
||||||
|
@ -60,7 +60,7 @@ static void glfw_window_iconify_callback( GLFWwindow*, int iconified )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Backend::Backend( const char* title, const std::function<void()>& redraw, const std::function<void(float)>& scaleChanged, RunQueue* mainThreadTasks )
|
Backend::Backend( const char* title, const std::function<void()>& redraw, const std::function<void(float)>& scaleChanged, const std::function<int(void)>& isBusy, RunQueue* mainThreadTasks )
|
||||||
{
|
{
|
||||||
glfwSetErrorCallback( glfw_error_callback );
|
glfwSetErrorCallback( glfw_error_callback );
|
||||||
if( !glfwInit() ) exit( 1 );
|
if( !glfwInit() ) exit( 1 );
|
||||||
|
@ -728,7 +728,7 @@ static void SetupCursor()
|
|||||||
s_cursorY = cursor->images[0]->hotspot_y * 120 / s_maxScale;
|
s_cursorY = cursor->images[0]->hotspot_y * 120 / s_maxScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
Backend::Backend( const char* title, const std::function<void()>& redraw, const std::function<void(float)>& scaleChanged, RunQueue* mainThreadTasks )
|
Backend::Backend( const char* title, const std::function<void()>& redraw, const std::function<void(float)>& scaleChanged, const std::function<int(void)>& isBusy, RunQueue* mainThreadTasks )
|
||||||
{
|
{
|
||||||
s_redraw = redraw;
|
s_redraw = redraw;
|
||||||
s_scaleChanged = scaleChanged;
|
s_scaleChanged = scaleChanged;
|
||||||
|
@ -341,7 +341,7 @@ int main( int argc, char** argv )
|
|||||||
LoadConfig();
|
LoadConfig();
|
||||||
|
|
||||||
ImGuiTracyContext imguiContext;
|
ImGuiTracyContext imguiContext;
|
||||||
Backend backend( title, DrawContents, ScaleChanged, &mainThreadTasks );
|
Backend backend( title, DrawContents, ScaleChanged, IsBusy, &mainThreadTasks );
|
||||||
tracy::InitTexture();
|
tracy::InitTexture();
|
||||||
iconTex = tracy::MakeTexture();
|
iconTex = tracy::MakeTexture();
|
||||||
zigzagTex = tracy::MakeTexture( true );
|
zigzagTex = tracy::MakeTexture( true );
|
||||||
|
Loading…
Reference in New Issue
Block a user