[client,sdl] move functions to proper place

This commit is contained in:
akallabeth
2023-04-14 11:50:17 +02:00
committed by akallabeth
parent 01293f4c3f
commit 0627baa939
4 changed files with 40 additions and 42 deletions

View File

@@ -173,40 +173,3 @@ BOOL sdl_push_user_event(Uint32 type, ...)
va_end(ap);
return SDL_PushEvent(&ev) == 1;
}
BOOL update_fullscreen(sdlContext* sdl, BOOL enter)
{
WINPR_ASSERT(sdl);
CriticalSectionLock lock(sdl->critical);
for (uint32_t x = 0; x < sdl->windowCount; x++)
{
sdl_window_t* window = &sdl->windows[x];
if (!sdl_push_user_event(SDL_USEREVENT_WINDOW_FULLSCREEN, window->window, enter))
return FALSE;
}
sdl->fullscreen = enter;
return TRUE;
}
BOOL update_resizeable(sdlContext* sdl, BOOL enable)
{
WINPR_ASSERT(sdl);
CriticalSectionLock lock(sdl->critical);
const rdpSettings* settings = sdl->common.context.settings;
const BOOL dyn = freerdp_settings_get_bool(settings, FreeRDP_DynamicResolutionUpdate);
const BOOL smart = freerdp_settings_get_bool(settings, FreeRDP_SmartSizing);
BOOL use = (dyn && enable) || smart;
for (uint32_t x = 0; x < sdl->windowCount; x++)
{
sdl_window_t* window = &sdl->windows[x];
if (!sdl_push_user_event(SDL_USEREVENT_WINDOW_RESIZEABLE, window->window, use))
return FALSE;
}
sdl->resizeable = use;
return TRUE;
}