| 472 | } |
| 473 | |
| 474 | void SetSceneSafeAreaMode(HScene scene, SafeAreaMode mode) |
| 475 | { |
| 476 | Scene* s = scene; |
| 477 | Context* context = s->m_Context; |
| 478 | s->m_SafeAreaModeOverride = true; |
| 479 | s->m_SafeAreaMode = mode; |
| 480 | |
| 481 | uint32_t window_width = context->m_WindowWidth; |
| 482 | uint32_t window_height = context->m_WindowHeight; |
| 483 | if (window_width == 0 || window_height == 0) |
| 484 | { |
| 485 | window_width = context->m_PhysicalWidth; |
| 486 | window_height = context->m_PhysicalHeight; |
| 487 | } |
| 488 | |
| 489 | uint32_t safe_width = 0; |
| 490 | uint32_t safe_height = 0; |
| 491 | float offset_x = 0.0f; |
| 492 | float offset_y = 0.0f; |
| 493 | ComputeSafeAreaAdjust(mode, window_width, window_height, |
| 494 | context->m_WindowInsetLeft, context->m_WindowInsetTop, |
| 495 | context->m_WindowInsetRight, context->m_WindowInsetBottom, |
| 496 | &safe_width, &safe_height, &offset_x, &offset_y); |
| 497 | SetSceneSafeAreaAdjust(s, mode != SAFE_AREA_NONE, safe_width, safe_height, offset_x, offset_y); |
| 498 | } |
| 499 | |
| 500 | void GetDefaultResolution(HContext context, uint32_t& width, uint32_t& height) |
| 501 | { |
no test coverage detected