diff --git a/client/include/app.h b/client/include/app.h index b3fe3cbb..0a9a7ed9 100644 --- a/client/include/app.h +++ b/client/include/app.h @@ -187,6 +187,6 @@ void app_stopVideo(bool stop); /** * Enable/disable the spice display */ -void app_useSpiceDisplay(bool enable); +bool app_useSpiceDisplay(bool enable); #endif diff --git a/client/src/app.c b/client/src/app.c index 9679d18d..fb838621 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -1041,25 +1041,25 @@ void app_stopVideo(bool stop) } } -void app_useSpiceDisplay(bool enable) +bool app_useSpiceDisplay(bool enable) { static bool lastState = false; if (!g_params.useSpice || lastState == enable) - return; + return g_params.useSpice && lastState; // if spice is not yet ready, flag the state we want for when it is if (!g_state.spiceReady) { g_state.initialSpiceDisplay = enable; - return; + return false; } if (!purespice_hasChannel(PS_CHANNEL_DISPLAY)) - return; + return false; - // do not allow stopping of the host app is not connected + // do not allow stopping of the host app if not connected if (!enable && !g_state.lgHostConnected) - return; + return false; lastState = enable; if (enable) @@ -1073,5 +1073,7 @@ void app_useSpiceDisplay(bool enable) renderQueue_spiceShow(false); purespice_disconnectChannel(PS_CHANNEL_DISPLAY); } + overlayStatus_set(LG_USER_STATUS_SPICE, enable); + return enable; } diff --git a/client/src/main.c b/client/src/main.c index 4ccf2520..ce3b6ccf 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -824,8 +824,8 @@ int main_frameThread(void * unused) if (g_state.state != APP_STATE_SHUTDOWN) { - overlaySplash_show(true); - app_useSpiceDisplay(true); + if (!app_useSpiceDisplay(true)) + overlaySplash_show(true); } if (g_state.useDMA)