Skip to content

Commit

Permalink
Remove registred game before switching profile
Browse files Browse the repository at this point in the history
  • Loading branch information
gasinvein committed Jul 6, 2021
1 parent 3a07a1f commit 8c7bf3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tunedmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ def _unregister_game(self, caller: Process, game: Process) -> int:
if game not in self.registred_games:
log(f'Process: {game.pid} is not registred', logging.ERROR)
return RES_ERROR
if not self.registred_games - {game}:
self.registred_games.remove(game)
if not self.registred_games:
log("No more registred PIDs left")
success, _ = self._switch_profile(self.initial_profile)
if not success:
return RES_ERROR
self.registred_games.remove(game)
return RES_SUCCESS

def _query_status(self, caller: Process, game: Process) -> int:
Expand Down

0 comments on commit 8c7bf3f

Please sign in to comment.