mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Track max output scale.
This commit is contained in:
parent
3d42732795
commit
63ba9cccf2
@ -54,6 +54,7 @@ struct Output
|
|||||||
wl_output* obj;
|
wl_output* obj;
|
||||||
};
|
};
|
||||||
static std::unordered_map<uint32_t, std::unique_ptr<Output>> s_output;
|
static std::unordered_map<uint32_t, std::unique_ptr<Output>> s_output;
|
||||||
|
static int s_maxScale = 1;
|
||||||
|
|
||||||
static bool s_running = true;
|
static bool s_running = true;
|
||||||
static int s_w, s_h;
|
static int s_w, s_h;
|
||||||
@ -190,6 +191,12 @@ static void OutputMode( void*, struct wl_output* output, uint32_t flags, int32_t
|
|||||||
|
|
||||||
static void OutputDone( void*, struct wl_output* output )
|
static void OutputDone( void*, struct wl_output* output )
|
||||||
{
|
{
|
||||||
|
int max = 1;
|
||||||
|
for( auto& out : s_output )
|
||||||
|
{
|
||||||
|
if( out.second->scale > max ) max = out.second->scale;
|
||||||
|
}
|
||||||
|
s_maxScale = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void OutputScale( void* data, struct wl_output* output, int32_t scale )
|
static void OutputScale( void* data, struct wl_output* output, int32_t scale )
|
||||||
|
Loading…
Reference in New Issue
Block a user