mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Follow-up to 7aa4547e60. Four ports -- flux, plasma, solarwinds and hyperspace -- still opened port_free with "if (!g_started) return;". That is unreachable today, since the JNI only calls destroy after a successful create, but unreachability is a property of the current call graph rather than of the function, and it contradicts the rule the fix established: gl1 is given back on every path out, because whatever it holds belongs to an EGL context that is about to die. All six are now unconditional. Same argument one level up. port_new opened with "if (g_started) return 1", which was defensible when gl1's state was whatever the last saver left, but nativeInit now calls gl1_lost() first -- so gl1 is guaranteed DOWN on entry and reporting success there would hand the caller a saver with no shim under it. A stale run is torn down instead, and gl1_init always runs. No behaviour change on any path reachable today. The point is that a saver added later, or an upstream cleanup that returns early, fails in its own saver instead of poisoning the next one.