[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user