File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,8 +83,19 @@ public OsuGameActivity()
8383
8484 protected override void OnCreate ( Bundle ? savedInstanceState )
8585 {
86- // Force orientation immediately to prevent unnecessary surface recreation on startup.
87- RequestedOrientation = ScreenOrientation . Landscape ;
86+ // NOTE: do NOT assign RequestedOrientation here. The `[Activity]` attribute on this
87+ // class already declares `ScreenOrientation = ScreenOrientation.Landscape`, so the
88+ // activity is created in landscape from the very first frame. A runtime re-assignment
89+ // *before* `base.OnCreate` (which is where SDL constructs the SurfaceView) gets
90+ // queued by Android and delivered exactly during initial SurfaceView setup, nudging
91+ // the SurfaceView into a destroy/recreate cycle on some OEMs while the SDL draw
92+ // thread is mid-Vulkan-init. The framework's `VeldridDevice` then either times out
93+ // its 5s `SurfaceHandle` poll (constructor throws, renderer never comes up) or hands
94+ // a stale handle to `vkCreateAndroidSurfaceKHR` (driver SIGSEGV) — either way the
95+ // game never renders a frame and the user is left staring at a black screen while
96+ // the per-frame retry / FirstChanceException pipeline floods the log. The same
97+ // invariant is documented further down in this method (see the "Phones: manifest
98+ // already requests Landscape; do not re-assign at runtime" block).
8899
89100 // Crash diagnostics first. The native handler write target is internal storage
90101 // (FilesDir/native_crash.log); a one-shot mirror copies it to external storage
You can’t perform that action at this time.
0 commit comments