mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] app: better handling of transition to/from spice display
This commit is contained in:
parent
b5dfbcb5a2
commit
47b2a26898
@ -1011,20 +1011,23 @@ bool app_guestIsOther(void)
|
||||
|
||||
void app_useSpiceDisplay(bool enable)
|
||||
{
|
||||
if (!g_params.useSpice)
|
||||
static bool enabled = false;
|
||||
|
||||
if (!g_params.useSpice || enabled == enable)
|
||||
return;
|
||||
|
||||
if (!purespice_hasChannel(PS_CHANNEL_DISPLAY))
|
||||
return;
|
||||
|
||||
enabled = enable;
|
||||
if (enable)
|
||||
{
|
||||
purespice_connectChannel(PS_CHANNEL_DISPLAY);
|
||||
// do not call spiceShow as the surface create callback will do this
|
||||
RENDERER(spiceShow, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
RENDERER(spiceShow, false);
|
||||
purespice_disconnectChannel(PS_CHANNEL_DISPLAY);
|
||||
RENDERER(spiceShow, false);
|
||||
}
|
||||
}
|
||||
|
@ -885,8 +885,6 @@ static void spice_surfaceCreate(unsigned int surfaceId, PSSurfaceFormat format,
|
||||
core_updatePositionInfo();
|
||||
|
||||
renderQueue_spiceConfigure(width, height);
|
||||
if (g_state.lgr)
|
||||
RENDERER(spiceShow, true);
|
||||
}
|
||||
|
||||
static void spice_surfaceDestroy(unsigned int surfaceId)
|
||||
|
Loading…
Reference in New Issue
Block a user