Merge branch 'main' of github.com:Polyfrost/OneLauncher

This commit is contained in:
Pauline 2024-08-19 21:40:25 +02:00
commit f46a63bb07
No known key found for this signature in database
GPG key ID: 722BB181973296AE
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 {