mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[client] opengl: support scaled UI for high DPI displays
This commit is contained in:
parent
3ec73e2444
commit
89bdaec95a
@ -303,11 +303,17 @@ void opengl_on_resize(void * opaque, const int width, const int height, const do
|
||||
{
|
||||
struct Inst * this = (struct Inst *)opaque;
|
||||
|
||||
this->window.x = width;
|
||||
this->window.y = height;
|
||||
this->window.x = width * scale;
|
||||
this->window.y = height * scale;
|
||||
|
||||
if (destRect.valid)
|
||||
memcpy(&this->destRect, &destRect, sizeof(LG_RendererRect));
|
||||
{
|
||||
this->destRect.valid = true;
|
||||
this->destRect.x = destRect.x * scale;
|
||||
this->destRect.y = destRect.y * scale;
|
||||
this->destRect.w = destRect.w * scale;
|
||||
this->destRect.h = destRect.h * scale;
|
||||
}
|
||||
|
||||
// setup the projection matrix
|
||||
glViewport(0, 0, this->window.x, this->window.y);
|
||||
|
Loading…
Reference in New Issue
Block a user