[Linux] Implement Feral Interactive's Gamemode for Potential Performance Increases (#17325)

Currently, this is a draft PR to implement Feral Interactive's Gamemode
into RPCS3, which can improve game performance on certain Linux systems.

At the moment, I am running into various compiler warnings when trying
to include "gamemode_client.h" due to the file not using strict typings
and old C-style casts. I know I can disable these flags during RPCS3's
compilation but I wanted to check with the maintainers before going
forward and if this feature should be implemented.

It should be noted that RPCS3 only fails to compile and run if I include
Feral's header file, but everything else compiles if I comment out the
include.

Targets Issue #11299
This commit is contained in:
ADAS2024
2025-07-06 05:50:03 -04:00
committed by GitHub
parent 46150322a3
commit ef566186be
17 changed files with 102 additions and 1 deletions
+11
View File
@@ -2477,6 +2477,11 @@ void Emulator::Run(bool start_playtime)
{
Emu.GetCallbacks().enable_display_sleep(false);
}
if (g_cfg.misc.enable_gamemode)
{
Emu.GetCallbacks().enable_gamemode(true);
}
}
void Emulator::RunPPU()
@@ -3237,6 +3242,12 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
sys_log.notice("Stopping emulator...");
// Calling Gamemode Exit on Stop
if (g_cfg.misc.enable_gamemode)
{
Emu.GetCallbacks().enable_gamemode(false);
}
const bool continuous_savestate_mode = savestate && !g_cfg.savestate.suspend_emu;
// Show visual feedback to the user in case that stopping takes a while.