MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / HybridRepositioning

Function HybridRepositioning

rEFIt_UEFI/refit/screen.cpp:393–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393INTN HybridRepositioning(INTN Edge, INTN Value, INTN ImageDimension, INTN ScreenDimension, INTN DesignScreenDimension)
394{
395 INTN pos, posThemeDesign;
396
397 if (DesignScreenDimension == 0xFFFF || ScreenDimension == DesignScreenDimension) {
398 // Calculate the horizontal pixel to place the top left corner of the animation - by screen resolution
399 pos = ConvertEdgeAndPercentageToPixelPosition(Edge, Value, ImageDimension, ScreenDimension);
400 } else {
401 // Calculate the horizontal pixel to place the top left corner of the animation - by theme design resolution
402 posThemeDesign = ConvertEdgeAndPercentageToPixelPosition(Edge, Value, ImageDimension, DesignScreenDimension);
403 // Try repositioning by center first
404 pos = RepositionFixedByCenter(posThemeDesign, ScreenDimension, DesignScreenDimension);
405 // If out of edges, try repositioning by gaps on edges
406 if (!IsImageWithinScreenLimits(pos, ImageDimension, ScreenDimension)) {
407 pos = RepositionRelativeByGapsOnEdges(posThemeDesign, ImageDimension, ScreenDimension, DesignScreenDimension);
408 }
409 }
410 return pos;
411}
412
413void REFIT_MENU_SCREEN::GetAnime()
414{

Callers 2

InitAnimeMethod · 0.85
ClearScreenMethod · 0.85

Tested by

no test coverage detected