We use a lot of os.path.exists('/.flatpak-info') calls to determine if we're running inside Flatpak. This can be stored as a constant. Maybe you could consider this a micro-optimisation as we don't call os.path.exists as much anymore, but my main motivation here was readibility.
I didn't test this in Flatpak, please feel free to do so to make sure I didn't screw anything up (or direct me on how to do it :smile:)
Thanks!
P.S. - This touches the dreaded SteamTinkerLaunch ctmod :wink: I have a laptop again (that I installed SteamTinkerLaunch on using ProtonUp-Qt!) so I am planning to tinker around with that ctmod again and make the code a bit less scary.
We use a lot of
os.path.exists('/.flatpak-info')
calls to determine if we're running inside Flatpak. This can be stored as a constant. Maybe you could consider this a micro-optimisation as we don't callos.path.exists
as much anymore, but my main motivation here was readibility.I didn't test this in Flatpak, please feel free to do so to make sure I didn't screw anything up (or direct me on how to do it :smile:)
Thanks!
P.S. - This touches the dreaded SteamTinkerLaunch ctmod :wink: I have a laptop again (that I installed SteamTinkerLaunch on using ProtonUp-Qt!) so I am planning to tinker around with that ctmod again and make the code a bit less scary.