File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -446,6 +446,23 @@ protected override void OnCreate(Bundle? savedInstanceState)
446446 if ( Window . Attributes != null )
447447 Window . Attributes . LayoutInDisplayCutoutMode = LayoutInDisplayCutoutMode . ShortEdges ;
448448
449+ // Request the display compositor skip post-processing on our window.
450+ // setPreferMinimalPostProcessing(true) tells SurfaceFlinger to bypass
451+ // color-calibration lookup tables and gamma correction, saving ~0.5–1ms
452+ // of latency on OLED/AMOLED panels. The tradeoff is that the rendered
453+ // output bypasses the device's factory color profile — acceptable for a
454+ // rhythm game where photon-to-registered-touch timing accuracy matters
455+ // more than display color fidelity. Available since API 28 (Android 9);
456+ // our minSdkVersion=33 guarantees the call always reaches the API.
457+ try
458+ {
459+ Window . SetPreferMinimalPostProcessing ( true ) ;
460+ }
461+ catch ( Exception e )
462+ {
463+ Logger . Log ( $ "[osu!] Failed to set minimal post-processing: { e . Message } ", LoggingTarget . Performance ) ;
464+ }
465+
449466 // Request unbuffered touch dispatch early for minimum input latency.
450467 try
451468 {
You can’t perform that action at this time.
0 commit comments