[host] capture: stop sending DPI information

The client doesn't need DPI information anymore, so there is no point
fetching it.
This commit is contained in:
Quantum 2021-07-17 02:21:26 -04:00 committed by Geoffrey McRae
parent e0c9a71cd8
commit 9ab85fd0b8
5 changed files with 3 additions and 32 deletions

View file

@ -108,7 +108,6 @@ typedef struct CaptureInterface
void (*stop )();
bool (*deinit )();
void (*free )();
unsigned int (*getMouseScale)();
CaptureResult (*capture )();
CaptureResult (*waitFrame )(CaptureFrame * frame, const size_t maxFrameSize);

View file

@ -165,11 +165,6 @@ static void xcb_free(void)
this = NULL;
}
static unsigned int xcb_getMouseScale(void)
{
return 100;
}
static CaptureResult xcb_capture(void)
{
assert(this);
@ -243,7 +238,6 @@ struct CaptureInterface Capture_XCB =
.init = xcb_init,
.deinit = xcb_deinit,
.free = xcb_free,
.getMouseScale = xcb_getMouseScale,
.capture = xcb_capture,
.waitFrame = xcb_waitFrame,
.getFrame = xcb_getFrame

View file

@ -26,7 +26,6 @@
#include "common/option.h"
#include "common/locking.h"
#include "common/event.h"
#include "common/dpi.h"
#include "common/runningavg.h"
#include "common/KVMFR.h"
@ -98,7 +97,6 @@ struct iface
unsigned int stride;
CaptureFormat format;
CaptureRotation rotation;
unsigned int dpi;
int lastPointerX, lastPointerY;
bool lastPointerVisible;
@ -419,7 +417,6 @@ static bool dxgi_init(void)
break;
}
this->dpi = monitor_dpi(outputDesc.Monitor);
++this->formatVer;
DEBUG_INFO("Feature Level : 0x%x" , this->featureLevel);
@ -674,14 +671,6 @@ static void dxgi_free(void)
this = NULL;
}
static unsigned int dxgi_getMouseScale(void)
{
assert(this);
assert(this->initialized);
return this->dpi * 100 / DPI_100_PERCENT;
}
static CaptureResult dxgi_hResultToCaptureResult(const HRESULT status)
{
switch(status)
@ -1088,7 +1077,6 @@ struct CaptureInterface Capture_DXGI =
.stop = dxgi_stop,
.deinit = dxgi_deinit,
.free = dxgi_free,
.getMouseScale = dxgi_getMouseScale,
.capture = dxgi_capture,
.waitFrame = dxgi_waitFrame,
.getFrame = dxgi_getFrame

View file

@ -27,7 +27,6 @@
#include "common/framebuffer.h"
#include "common/event.h"
#include "common/thread.h"
#include "common/dpi.h"
#include "common/KVMFR.h"
#include <assert.h>
#include <stdlib.h>
@ -59,7 +58,6 @@ struct iface
unsigned int maxWidth , maxHeight;
unsigned int width , height;
unsigned int dpi;
unsigned int formatVer;
unsigned int grabWidth, grabHeight, grabStride;
@ -86,7 +84,7 @@ static bool nvfbc_deinit(void);
static void nvfbc_free(void);
static int pointerThread(void * unused);
static void getDesktopSize(unsigned int * width, unsigned int * height, unsigned int * dpi)
static void getDesktopSize(unsigned int * width, unsigned int * height)
{
HMONITOR monitor = MonitorFromWindow(GetDesktopWindow(), MONITOR_DEFAULTTOPRIMARY);
MONITORINFO monitorInfo = {
@ -94,7 +92,6 @@ static void getDesktopSize(unsigned int * width, unsigned int * height, unsigned
};
GetMonitorInfo(monitor, &monitorInfo);
*dpi = monitor_dpi(monitor);
*width = monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left;
*height = monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top;
@ -191,7 +188,7 @@ static bool nvfbc_init(void)
}
free(privData);
getDesktopSize(&this->width, &this->height, &this->dpi);
getDesktopSize(&this->width, &this->height);
HANDLE event;
if (!NvFBCToSysSetup(
@ -298,14 +295,9 @@ static void nvfbc_free(void)
NvFBCFree();
}
static unsigned int nvfbc_getMouseScale(void)
{
return this->dpi * 100 / DPI_100_PERCENT;
}
static CaptureResult nvfbc_capture(void)
{
getDesktopSize(&this->width, &this->height, &this->dpi);
getDesktopSize(&this->width, &this->height);
NvFBCFrameGrabInfo grabInfo;
CaptureResult result = NvFBCToSysCapture(
this->nvfbc,
@ -602,7 +594,6 @@ struct CaptureInterface Capture_NVFBC =
.stop = nvfbc_stop,
.deinit = nvfbc_deinit,
.free = nvfbc_free,
.getMouseScale = nvfbc_getMouseScale,
.capture = nvfbc_capture,
.waitFrame = nvfbc_waitFrame,
.getFrame = nvfbc_getFrame

View file

@ -235,7 +235,6 @@ static bool sendFrame(void)
fi->stride = frame.stride;
fi->pitch = frame.pitch;
fi->offset = app.pageSize - FrameBufferStructSize;
fi->mouseScalePercent = app.iface->getMouseScale();
fi->blockScreensaver = os_blockScreensaver();
app.frameValid = true;