mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-08-06 05:08:29 +02:00
Refactor to store the initial governor state when gamemode is entered
Rather than when gamemoded is started. As see in Issue #52. A small refactor here to ensure things stay consistent, especially to stop storing a pointer from get_gov_state that might have had it's memory changed at some point, confusingly.
This commit is contained in:
@@ -99,8 +99,9 @@ int fetch_governors(char governors[MAX_GOVERNORS][MAX_GOVERNOR_LENGTH])
|
||||
*/
|
||||
const char *get_gov_state(void)
|
||||
{
|
||||
/* Cached primary governor state */
|
||||
/* Persistent governor state */
|
||||
static char governor[64] = { 0 };
|
||||
memset(governor, 0, sizeof(governor));
|
||||
|
||||
/* State for all governors */
|
||||
char governors[MAX_GOVERNORS][MAX_GOVERNOR_LENGTH] = { { 0 } };
|
||||
|
Reference in New Issue
Block a user