mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Conditional framerate limiting on Wayland.
This commit is contained in:
parent
c21170cc01
commit
e85457815e
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "Backend.hpp"
|
#include "Backend.hpp"
|
||||||
#include "RunQueue.hpp"
|
#include "RunQueue.hpp"
|
||||||
|
#include "profiler/TracyConfig.hpp"
|
||||||
|
|
||||||
constexpr ImGuiKey s_keyTable[] = {
|
constexpr ImGuiKey s_keyTable[] = {
|
||||||
/* 0 */ ImGuiKey_None,
|
/* 0 */ ImGuiKey_None,
|
||||||
@ -224,6 +225,9 @@ static uint64_t s_time;
|
|||||||
static wl_fixed_t s_wheelAxisX, s_wheelAxisY;
|
static wl_fixed_t s_wheelAxisX, s_wheelAxisY;
|
||||||
static bool s_wheel;
|
static bool s_wheel;
|
||||||
|
|
||||||
|
extern tracy::Config s_config;
|
||||||
|
|
||||||
|
|
||||||
static void RecomputeScale()
|
static void RecomputeScale()
|
||||||
{
|
{
|
||||||
if( s_fracSurf ) return;
|
if( s_fracSurf ) return;
|
||||||
@ -876,7 +880,7 @@ void Backend::Run()
|
|||||||
{
|
{
|
||||||
while( s_running && wl_display_dispatch( s_dpy ) != -1 )
|
while( s_running && wl_display_dispatch( s_dpy ) != -1 )
|
||||||
{
|
{
|
||||||
if( !s_hasFocus ) std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) );
|
if( s_config.focusLostLimit && !s_hasFocus ) std::this_thread::sleep_for( std::chrono::milliseconds( 50 ) );
|
||||||
s_redraw();
|
s_redraw();
|
||||||
s_mainThreadTasks->Run();
|
s_mainThreadTasks->Run();
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ void* zigzagTex;
|
|||||||
static Backend* bptr;
|
static Backend* bptr;
|
||||||
static bool s_customTitle = false;
|
static bool s_customTitle = false;
|
||||||
static bool s_isElevated = false;
|
static bool s_isElevated = false;
|
||||||
static tracy::Config s_config;
|
tracy::Config s_config;
|
||||||
|
|
||||||
static void SetWindowTitleCallback( const char* title )
|
static void SetWindowTitleCallback( const char* title )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user