🐛 fix: Gamemode bindings

This commit is contained in:
LynithDev 2024-08-19 10:47:39 +02:00
parent 85bbf0347c
commit 0e438e5378
2 changed files with 644 additions and 721 deletions

File diff suppressed because it is too large Load diff

View file

@ -3,13 +3,13 @@ use std::ffi::c_int;
#[link(name = "stub", kind = "static")]
extern "C" {
fn gamemode_request_start_for_wrapper(pid: pid_t) -> c_int;
fn gamemode_start_for_wrapper(pid: pid_t) -> c_int;
}
pub fn request_start_for_wrapper(pid: u32) -> Result<(), String> {
match pid.try_into() {
Ok(signed) => unsafe {
let result = gamemode_request_start_for_wrapper(signed);
let result = gamemode_start_for_wrapper(signed);
if result == 0 {
Ok(())
} else {