// Tests for native rows and columns (GitHub #34): video::NativeShape and // video::AutoNativeScale (runtime/video/picture_fit.cpp). From the repo root: // clang++ -std=c++20 -O2 -Iruntime tests/native_rows_test.cpp runtime/video/picture_fit.cpp -o build/native_rows_test // build/native_rows_test // The report: on a Steam Deck (1280x800, Fill Screen, Internal Resolution // 1x) the game rendered its 16:9 frame's 720 rows and the presenter // stretched them to 800, so the picture was softer than at 16:9, whose 720 // rows it showed 1:1. Checked: // - a Vert+ picture renders the rows its shape has at the setting's // columns, a Hor+ one the columns at its rows: the Deck's 1280x800 at 1x // is 1280x800, shown 1:1; 1.5x on 1920x1200 and 2x on 2560x1600 too; a // MacBook's 3024x1898 within a pixel of its shape; ultrawides, 4:3, a // phone; // - every picture within 0.5% of 16:9 (16:9 screens, letterboxed boxes, // the 16:9 setting on any screen) keeps the setting's scale on both // axes, and Auto there is AutoRenderScale's, exactly as before; // - Auto takes the native shape only within its budget (the Deck's 1x10/9 // at 4, an ultrawide's 2.6875x2 at 6), else keeps AutoRenderScale's. // Planted bugs this catches (each tried): rows from the 720 rows instead of // the columns (1x on the Deck 1x1), the 16:9 margin dropped (a 1366x768 box // gets 1281/1280 columns), the budget unchecked (a MacBook's Auto 2x2.232). #include