mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[client,sdl] move functions to proper place
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user