gamemode: Implement FeralInteractive/gamemode support #437
No reviewers
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach!437
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The previous comment assumed that we needed to compile the gamemode shared library ourselves, which is wrong, so I deleted the old comment.
As a sidenote:
getEnvVarOwned()was taken from utils.zig (it is used to check GPU_BACKEND), when exiting the program, the gpa said there were memory leaks, which were caused bygetEnvVarOwned(). Should we free the other strings where it's called too?Maybe move these blocks into a separate function we call from here, e.g.
platform.deinitLinuxGameMode()@ -40,3 +42,4 @@const EventQueue = std.TailQueue(structs.Event);const EventNode = EventQueue.Node;Same here, so the
initfunction doesn't grow too large.what's the motivation for using translate-c vs. just directly importing the header?
Definitely, it probably was copied from a build script where free'ing is not important due to arena allocator. Do you want to include a commit to fix it (or send another PR)?
zig translate-cproduced a zig file with an error that made it not compile. It tried to@alignCast(std.meta.alignment(?*anyopaque), &REAL_internal_gamemode_request_start), for all the functions. In fetch_upstream.sh I delete that part to make it compileAfter checking more closely I noticed the
getEnvVarOwned()that leaked were all in the build scripts, I guess there is no need to fix themdid these symlink changes make it into here by accident? feel free to force-push if so
I was testing if it worked and forgot to go back to how it was before
Maybe check for both
offandfalsehere?We could store whether or not we used gamemode in a field of
platformstruct, so that we can reuse it simply in the deinit code without duplicating the env var handling logicAhh got it, makes sense
hopefully this fixes #405
LGTM once https://github.com/hexops/mach/pull/437#discussion_r932012343 is addressed
🔥 you rock, really excited to have this!