Skip to content

Commit c949d87

Browse files
Address review feedback: fix comment formatting and consolidate duplicate Logger.Log calls
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/3c1fa36e-ab75-466a-9437-b218eeb9fa8e Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent f468cc5 commit c949d87

2 files changed

Lines changed: 13 additions & 18 deletions

File tree

osu.Android/OsuGameActivity.cs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -683,20 +683,16 @@ public void SurfaceChanged(ISurfaceHolder holder, global::Android.Graphics.Forma
683683
// picks up the new ANativeWindow and negotiates a proper BGRA/RGBA 8-bit swapchain.
684684
if (format == global::Android.Graphics.Format.Rgb565 && LogManagement.IsVulkanConfigured())
685685
{
686-
Logger.Log(
687-
"[osu!] Android surface pixel format RGB565 detected mid-session (Vulkan path). " +
688-
"Requesting RGBA8888 and triggering a surface recreate. " +
689-
"If this fires after startup it indicates an OEM display-mode change " +
690-
"(e.g. SetSustainedPerformanceMode) reset the surface format.",
691-
LoggingTarget.Runtime,
692-
LogLevel.Important);
693-
Logger.Log(
694-
"[osu!] Android surface pixel format RGB565 is incompatible with the Vulkan rendering pipeline " +
695-
"— requesting RGBA8888 and triggering a surface recreate. " +
696-
"This is the root cause of the Vulkan black-screen crash on Adreno (SDL_PIXELFORMAT_RGB565 in runtime log). " +
697-
"The next SurfaceChanged will carry the corrected format.",
698-
LoggingTarget.Performance,
699-
LogLevel.Important);
686+
// Log to Runtime so the mid-session RGB565 reset is visible in the main log
687+
// (and therefore in the notification overlay). Performance log gets the same
688+
// entry for correlation with display-mode and frame-timing data.
689+
string rgb565Message =
690+
"[osu!] Android surface pixel format RGB565 detected (Vulkan path) — " +
691+
"requesting RGBA8888 and triggering a surface recreate. " +
692+
"If this fires after startup an OEM display-mode change reset the surface format, " +
693+
"which would cause a mid-session swapchain rebuild at wrong dimensions.";
694+
Logger.Log(rgb565Message, LoggingTarget.Runtime, LogLevel.Important);
695+
Logger.Log(rgb565Message, LoggingTarget.Performance, LogLevel.Important);
700696

701697
try
702698
{

osu.Android/OsuGameAndroid.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ protected override void LoadComplete()
379379
//
380380
// Pinning Update + Draw + Input to a 5-core subset (mask 0xF8 on SD8G2) is the
381381
// ONLY unconditional Android-specific synchronous mutation we still perform
382-
// during the cold-start window — every other customisation (
383-
// RequestUnbufferedDispatch, refresh-rate selection, Oboe / Vulkan-probe init,
382+
// during the cold-start window — every other customisation (RequestUnbufferedDispatch,
383+
// refresh-rate selection, Oboe / Vulkan-probe init,
384384
// performance-mode GC-latency flip) is already deferred behind the
385385
// refreshRateDelayMs scheduler below. Field logs.zip on v2026.423.176 show both
386386
// a normal launch and a safe-mode launch dying silently mid-Toolbar load
@@ -1019,8 +1019,7 @@ protected override void LoadComplete()
10191019
// the BDL load thread, in the silent cold-start window — exactly
10201020
// when we are debugging a startup hang. Deferring the initial
10211021
// fire via Scheduler.AddDelayed onto the same refreshRateDelayMs
1022-
// timer that gates the initial refresh-
1023-
// rate apply / the initial performance-mode apply keeps the cold-
1022+
// timer that gates the initial refresh-rate apply / performance-mode apply keeps the cold-
10241023
// start path free of synchronous native init even when a saved-
10251024
// true setting would otherwise force it, AND ensures the native
10261025
// init actually lands AFTER the cold-start Toolbar texture-upload

0 commit comments

Comments
 (0)