mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
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
25 lines
487 B
C++
25 lines
487 B
C++
#include "gamemode_control.h"
|
|
|
|
#ifdef GAMEMODE_AVAILABLE
|
|
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
|
extern "C" {
|
|
#include "3rdparty/feralinteractive/feralinteractive/lib/gamemode_client.h"
|
|
}
|
|
#endif
|
|
|
|
// Enables and Disables GameMode based on user settings and system
|
|
void enable_gamemode([[maybe_unused]] bool enabled)
|
|
{
|
|
#if defined(GAMEMODE_AVAILABLE)
|
|
// Enable and Disable Gamemode
|
|
if (enabled)
|
|
{
|
|
gamemode_request_start();
|
|
}
|
|
else
|
|
{
|
|
gamemode_request_end();
|
|
}
|
|
#endif
|
|
}
|