MCPcopy Create free account
hub / github.com/amwatson/CitraVR / CustomFrameLayout

Function CustomFrameLayout

src/core/frontend/framebuffer_layout.cpp:374–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped) {
375 ASSERT(width > 0);
376 ASSERT(height > 0);
377
378 FramebufferLayout res{width, height, true, true, {}, {}, !Settings::values.upright_screen};
379
380 Common::Rectangle<u32> top_screen{Settings::values.custom_top_left.GetValue(),
381 Settings::values.custom_top_top.GetValue(),
382 Settings::values.custom_top_right.GetValue(),
383 Settings::values.custom_top_bottom.GetValue()};
384 Common::Rectangle<u32> bot_screen{Settings::values.custom_bottom_left.GetValue(),
385 Settings::values.custom_bottom_top.GetValue(),
386 Settings::values.custom_bottom_right.GetValue(),
387 Settings::values.custom_bottom_bottom.GetValue()};
388
389 if (is_swapped) {
390 res.top_screen = bot_screen;
391 res.bottom_screen = top_screen;
392 } else {
393 res.top_screen = top_screen;
394 res.bottom_screen = bot_screen;
395 }
396 return res;
397}
398
399FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondary) {
400 if (Settings::values.custom_layout.GetValue() == true) {

Calls 1

GetValueMethod · 0.80

Tested by

no test coverage detected