mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[warnings] fix -Wunused-function
* delete unused functions that are no longer required * define guard functions only used while debugging
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
|
||||
#define TAG MODULE_TAG("persist-bitmap-filter")
|
||||
|
||||
// #define REPLY_WITH_EMPTY_OFFER
|
||||
|
||||
static constexpr char plugin_name[] = "bitmap-filter";
|
||||
static constexpr char plugin_desc[] =
|
||||
"this plugin deactivates and filters persistent bitmap cache.";
|
||||
@@ -267,6 +269,7 @@ static BOOL filter_set_plugin_data(proxyPlugin* plugin, proxyData* pdata, DynCha
|
||||
return mgr->SetPluginData(mgr, plugin_name, pdata, data);
|
||||
}
|
||||
|
||||
#if defined(REPLY_WITH_EMPTY_OFFER)
|
||||
static UINT8 drdynvc_value_to_cblen(UINT32 value)
|
||||
{
|
||||
if (value <= 0xFF)
|
||||
@@ -328,6 +331,7 @@ static BOOL filter_forward_empty_offer(const char* sessionID, proxyDynChannelInt
|
||||
data->rewritten = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static BOOL filter_dyn_channel_intercept(proxyPlugin* plugin, proxyData* pdata, void* arg)
|
||||
{
|
||||
@@ -396,7 +400,8 @@ static BOOL filter_dyn_channel_intercept(proxyPlugin* plugin, proxyData* pdata,
|
||||
inputDataLength, state->remaining());
|
||||
data->result = PF_CHANNEL_RESULT_DROP;
|
||||
|
||||
#if 0 // TODO: Sending this does screw up some windows RDP server versions :/
|
||||
#if defined(REPLY_WITH_EMPTY_OFFER) // TODO: Sending this does screw up some windows RDP server
|
||||
// versions :/
|
||||
if (state->remaining() == 0)
|
||||
{
|
||||
if (!filter_forward_empty_offer(pdata->session_id, data, pos,
|
||||
|
||||
@@ -193,36 +193,6 @@ static BOOL pf_client_use_proxy_smartcard_auth(const rdpSettings* settings)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL freerdp_client_load_static_channel_addin(rdpChannels* channels, rdpSettings* settings,
|
||||
const char* name, void* data)
|
||||
{
|
||||
PVIRTUALCHANNELENTRY entry = NULL;
|
||||
PVIRTUALCHANNELENTRY lentry = freerdp_load_channel_addin_entry(
|
||||
name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC | FREERDP_ADDIN_CHANNEL_ENTRYEX);
|
||||
PVIRTUALCHANNELENTRYEX entryEx = WINPR_FUNC_PTR_CAST(lentry, PVIRTUALCHANNELENTRYEX);
|
||||
if (!entryEx)
|
||||
entry = freerdp_load_channel_addin_entry(name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC);
|
||||
|
||||
if (entryEx)
|
||||
{
|
||||
if (freerdp_channels_client_load_ex(channels, settings, entryEx, data) == 0)
|
||||
{
|
||||
WLog_INFO(TAG, "loading channelEx %s", name);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else if (entry)
|
||||
{
|
||||
if (freerdp_channels_client_load(channels, settings, entry, data) == 0)
|
||||
{
|
||||
WLog_INFO(TAG, "loading channel %s", name);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static BOOL pf_client_pre_connect(freerdp* instance)
|
||||
{
|
||||
pClientContext* pc = NULL;
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
|
||||
#define TAG SERVER_TAG("shadow.x11")
|
||||
|
||||
// #define USE_SHADOW_BLEND_CURSOR
|
||||
|
||||
static UINT32 x11_shadow_enum_monitors(MONITOR_DEF* monitors, UINT32 maxMonitors);
|
||||
|
||||
#ifdef WITH_PAM
|
||||
@@ -589,54 +591,19 @@ static int x11_shadow_handle_xevent(x11ShadowSubsystem* subsystem, XEvent* xeven
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void x11_shadow_validate_region(x11ShadowSubsystem* subsystem, int x, int y, int width,
|
||||
int height)
|
||||
{
|
||||
XRectangle region;
|
||||
|
||||
if (!subsystem->use_xfixes || !subsystem->use_xdamage)
|
||||
return;
|
||||
|
||||
region.x = WINPR_ASSERTING_INT_CAST(INT16, x);
|
||||
region.y = WINPR_ASSERTING_INT_CAST(INT16, y);
|
||||
region.width = WINPR_ASSERTING_INT_CAST(UINT16, width);
|
||||
region.height = WINPR_ASSERTING_INT_CAST(UINT16, height);
|
||||
#if defined(WITH_XFIXES) && defined(WITH_XDAMAGE)
|
||||
XLockDisplay(subsystem->display);
|
||||
XFixesSetRegion(subsystem->display, subsystem->xdamage_region, ®ion, 1);
|
||||
XDamageSubtract(subsystem->display, subsystem->xdamage, subsystem->xdamage_region, None);
|
||||
XUnlockDisplay(subsystem->display);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(USE_SHADOW_BLEND_CURSOR)
|
||||
static int x11_shadow_blend_cursor(x11ShadowSubsystem* subsystem)
|
||||
{
|
||||
UINT32 nXSrc = 0;
|
||||
UINT32 nYSrc = 0;
|
||||
INT64 nXDst = 0;
|
||||
INT64 nYDst = 0;
|
||||
UINT32 nWidth = 0;
|
||||
UINT32 nHeight = 0;
|
||||
UINT32 nSrcStep = 0;
|
||||
UINT32 nDstStep = 0;
|
||||
BYTE* pSrcData = NULL;
|
||||
BYTE* pDstData = NULL;
|
||||
BYTE A = 0;
|
||||
BYTE R = 0;
|
||||
BYTE G = 0;
|
||||
BYTE B = 0;
|
||||
rdpShadowSurface* surface = NULL;
|
||||
|
||||
if (!subsystem)
|
||||
return -1;
|
||||
|
||||
surface = subsystem->common.server->surface;
|
||||
nXSrc = 0;
|
||||
nYSrc = 0;
|
||||
nWidth = subsystem->cursorWidth;
|
||||
nHeight = subsystem->cursorHeight;
|
||||
nXDst = subsystem->common.pointerX - subsystem->cursorHotX;
|
||||
nYDst = subsystem->common.pointerY - subsystem->cursorHotY;
|
||||
rdpShadowSurface* surface = subsystem->common.server->surface;
|
||||
UINT32 nXSrc = 0;
|
||||
UINT32 nYSrc = 0;
|
||||
UINT32 nWidth = subsystem->cursorWidth;
|
||||
UINT32 nHeight = subsystem->cursorHeight;
|
||||
INT64 nXDst = subsystem->common.pointerX - subsystem->cursorHotX;
|
||||
INT64 nYDst = subsystem->common.pointerY - subsystem->cursorHotY;
|
||||
|
||||
if (nXDst >= surface->width)
|
||||
return 1;
|
||||
@@ -674,10 +641,10 @@ static int x11_shadow_blend_cursor(x11ShadowSubsystem* subsystem)
|
||||
if ((nYDst + nHeight) > surface->height)
|
||||
nHeight = (nYDst > surface->height) ? 0 : (UINT32)(surface->height - nYDst);
|
||||
|
||||
pSrcData = subsystem->cursorPixels;
|
||||
nSrcStep = subsystem->cursorWidth * 4;
|
||||
pDstData = surface->data;
|
||||
nDstStep = surface->scanline;
|
||||
const BYTE* pSrcData = subsystem->cursorPixels;
|
||||
const UINT32 nSrcStep = subsystem->cursorWidth * 4;
|
||||
BYTE* pDstData = surface->data;
|
||||
const UINT32 nDstStep = surface->scanline;
|
||||
|
||||
for (size_t y = 0; y < nHeight; y++)
|
||||
{
|
||||
@@ -687,10 +654,10 @@ static int x11_shadow_blend_cursor(x11ShadowSubsystem* subsystem)
|
||||
|
||||
for (size_t x = 0; x < nWidth; x++)
|
||||
{
|
||||
B = *pSrcPixel++;
|
||||
G = *pSrcPixel++;
|
||||
R = *pSrcPixel++;
|
||||
A = *pSrcPixel++;
|
||||
const BYTE B = *pSrcPixel++;
|
||||
const BYTE G = *pSrcPixel++;
|
||||
const BYTE R = *pSrcPixel++;
|
||||
const BYTE A = *pSrcPixel++;
|
||||
|
||||
if (A == 0xFF)
|
||||
{
|
||||
@@ -712,6 +679,7 @@ static int x11_shadow_blend_cursor(x11ShadowSubsystem* subsystem)
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static BOOL x11_shadow_check_resize(x11ShadowSubsystem* subsystem)
|
||||
{
|
||||
@@ -876,7 +844,10 @@ static int x11_shadow_screen_grab(x11ShadowSubsystem* subsystem)
|
||||
if (!success)
|
||||
goto fail_capture;
|
||||
|
||||
// x11_shadow_blend_cursor(subsystem);
|
||||
#if defined(USE_SHADOW_BLEND_CURSOR)
|
||||
if (x11_shadow_blend_cursor(subsystem) < 0)
|
||||
goto fail_capture;
|
||||
#endif
|
||||
count = ArrayList_Count(server->clients);
|
||||
shadow_subsystem_frame_update(&subsystem->common);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user