mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-10 17:38:10 +00:00
[client] renderer: add interface for high DPI rendering
This commit is contained in:
@@ -349,18 +349,19 @@ void app_updateWindowPos(int x, int y)
|
||||
g_state.windowPos.y = y;
|
||||
}
|
||||
|
||||
void app_handleResizeEvent(int w, int h, const struct Border border)
|
||||
void app_handleResizeEvent(int w, int h, double scale, const struct Border border)
|
||||
{
|
||||
memcpy(&g_state.border, &border, sizeof(border));
|
||||
|
||||
/* don't do anything else if the window dimensions have not changed */
|
||||
if (g_state.windowW == w && g_state.windowH == h)
|
||||
if (g_state.windowW == w && g_state.windowH == h && g_state.windowScale == scale)
|
||||
return;
|
||||
|
||||
g_state.windowW = w;
|
||||
g_state.windowH = h;
|
||||
g_state.windowCX = w / 2;
|
||||
g_state.windowCY = h / 2;
|
||||
g_state.windowW = w;
|
||||
g_state.windowH = h;
|
||||
g_state.windowCX = w / 2;
|
||||
g_state.windowCY = h / 2;
|
||||
g_state.windowScale = scale;
|
||||
core_updatePositionInfo();
|
||||
|
||||
if (core_inputEnabled())
|
||||
|
@@ -126,7 +126,7 @@ static int renderThread(void * unused)
|
||||
{
|
||||
if (g_state.lgr)
|
||||
g_state.lgr->on_resize(g_state.lgrData, g_state.windowW, g_state.windowH,
|
||||
g_state.dstRect, g_params.winRotate);
|
||||
g_state.windowScale, g_state.dstRect, g_params.winRotate);
|
||||
atomic_compare_exchange_weak(&g_state.lgrResize, &resize, 0);
|
||||
}
|
||||
|
||||
|
@@ -58,6 +58,7 @@ struct AppState
|
||||
struct Point windowPos;
|
||||
int windowW, windowH;
|
||||
int windowCX, windowCY;
|
||||
double windowScale;
|
||||
LG_RendererRotate rotate;
|
||||
bool focused;
|
||||
struct Border border;
|
||||
|
Reference in New Issue
Block a user