[client,sdl] dialogs respect UseCommonStdioCallbacks

If FreeRDP_UseCommonStdioCallbacks is set do not show connection/error
dialogs but only print to console
This commit is contained in:
Armin Novak 2023-12-21 07:56:23 +01:00 committed by akallabeth
parent bc2638c5e2
commit fcdb1a6fd4
1 changed files with 11 additions and 7 deletions

View File

@ -600,12 +600,15 @@ static BOOL sdl_pre_connect(freerdp* instance)
return FALSE;
std::lock_guard<CriticalSection> lock(sdl->critical);
if (!freerdp_settings_get_bool(settings, FreeRDP_UseCommonStdioCallbacks))
sdl->connection_dialog.reset(new SDLConnectionDialog(instance->context));
if (sdl->connection_dialog)
{
sdl->connection_dialog->setTitle("Connecting to '%s'",
freerdp_settings_get_server_name(settings));
sdl->connection_dialog->showInfo("The connection is being established\n\nPlease wait...");
sdl->connection_dialog->showInfo(
"The connection is being established\n\nPlease wait...");
}
if (!sdl_detect_monitors(sdl, &maxWidth, &maxHeight))
return FALSE;
@ -1338,6 +1341,7 @@ terminate:
default:
{
std::lock_guard<CriticalSection> lock(sdl->critical);
if (sdl->connection_dialog)
sdl->connection_dialog->showError(error_msg);
}
break;