prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  PCSX2 Runner: Add config path/file options (Feature request)
  It would be nice to have a way to specify a config file as for example some games run better with a multi-threaded microVU than others. It would also enable to have different window sizes set for those seeking square pixels as some NTSC games run at 640x448 and others use 512x448. Same goes for PAL region games. :slightly_smiling_face: 
  
  The command line is: `PCSX2 --cfg=<str>`
  
  I'm absolutely fine if you put it on low priority as probably only few people use PCSX2 anyways. :wink: 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `lutris/runners/pcsx2.py`
  Content:
  ```
  1 # Standard Library
  2 from gettext import gettext as _
  3 
  4 # Lutris Modules
  5 from lutris.runners.runner import Runner
  6 from lutris.util import system
  7 
  8 
  9 class pcsx2(Runner):
  10     human_name = _("PCSX2")
  11     description = _("PlayStation 2 emulator")
  12     platforms = [_("Sony PlayStation 2")]
  13     runnable_alone = True
  14     runner_executable = "pcsx2/PCSX2"
  15     game_options = [{
  16         "option": "main_file",
  17         "type": "file",
  18         "label": _("ISO file"),
  19         "default_path": "game_path",
  20     }]
  21 
  22     runner_options = [
  23         {
  24             "option": "fullscreen",
  25             "type": "bool",
  26             "label": _("Fullscreen"),
  27             "default": False,
  28         },
  29         {
  30             "option": "full_boot",
  31             "type": "bool",
  32             "label": _("Fullboot"),
  33             "default": False
  34         },
  35         {
  36             "option": "nogui",
  37             "type": "bool",
  38             "label": _("No GUI"),
  39             "default": False
  40         },
  41         {
  42             "option": "config_file",
  43             "type": "file",
  44             "label": _("Custom config file"),
  45             "advanced": True,
  46         },
  47         {
  48             "option": "config_path",
  49             "type": "directory_chooser",
  50             "label": _("Custom config path"),
  51             "advanced": True,
  52         },
  53     ]
  54 
  55     def play(self):
  56         arguments = [self.get_executable()]
  57 
  58         if self.runner_config.get("fullscreen"):
  59             arguments.append("--fullscreen")
  60         if self.runner_config.get("full_boot"):
  61             arguments.append("--fullboot")
  62         if self.runner_config.get("nogui"):
  63             arguments.append("--nogui")
  64         if self.runner_config.get("config_file"):
  65             arguments.append("--cfg=%s", self.runner_config["config_file"])
  66         if self.runner_config.get("config_path"):
  67             arguments.append("--cfgpath=%s", self.runner_config["config_path"])
  68 
  69         iso = self.game_config.get("main_file") or ""
  70         if not system.path_exists(iso):
  71             return {"error": "FILE_NOT_FOUND", "file": iso}
  72         arguments.append(iso)
  73         return {"command": arguments}
  74
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/lutris/runners/pcsx2.py b/lutris/runners/pcsx2.py
  --- a/lutris/runners/pcsx2.py
  +++ b/lutris/runners/pcsx2.py
  @@ -62,9 +62,9 @@
           if self.runner_config.get("nogui"):
               arguments.append("--nogui")
           if self.runner_config.get("config_file"):
  -            arguments.append("--cfg=%s", self.runner_config["config_file"])
  +            arguments.append("--cfg={}".format(self.runner_config["config_file"]))
           if self.runner_config.get("config_path"):
  -            arguments.append("--cfgpath=%s", self.runner_config["config_path"])
  +            arguments.append("--cfgpath={}".format(self.runner_config["config_path"]))
   
           iso = self.game_config.get("main_file") or ""
           if not system.path_exists(iso):
  
verification_info: {"golden_diff": "diff --git a/lutris/runners/pcsx2.py b/lutris/runners/pcsx2.py\n--- a/lutris/runners/pcsx2.py\n+++ b/lutris/runners/pcsx2.py\n@@ -62,9 +62,9 @@\n         if self.runner_config.get(\"nogui\"):\n             arguments.append(\"--nogui\")\n         if self.runner_config.get(\"config_file\"):\n-            arguments.append(\"--cfg=%s\", self.runner_config[\"config_file\"])\n+            arguments.append(\"--cfg={}\".format(self.runner_config[\"config_file\"]))\n         if self.runner_config.get(\"config_path\"):\n-            arguments.append(\"--cfgpath=%s\", self.runner_config[\"config_path\"])\n+            arguments.append(\"--cfgpath={}\".format(self.runner_config[\"config_path\"]))\n \n         iso = self.game_config.get(\"main_file\") or \"\"\n         if not system.path_exists(iso):\n", "issue": "PCSX2 Runner: Add config path/file options (Feature request)\nIt would be nice to have a way to specify a config file as for example some games run better with a multi-threaded microVU than others. It would also enable to have different window sizes set for those seeking square pixels as some NTSC games run at 640x448 and others use 512x448. Same goes for PAL region games. :slightly_smiling_face: \r\n\r\nThe command line is: `PCSX2 --cfg=<str>`\r\n\r\nI'm absolutely fine if you put it on low priority as probably only few people use PCSX2 anyways. :wink: \n", "before_files": [{"content": "# Standard Library\nfrom gettext import gettext as _\n\n# Lutris Modules\nfrom lutris.runners.runner import Runner\nfrom lutris.util import system\n\n\nclass pcsx2(Runner):\n    human_name = _(\"PCSX2\")\n    description = _(\"PlayStation 2 emulator\")\n    platforms = [_(\"Sony PlayStation 2\")]\n    runnable_alone = True\n    runner_executable = \"pcsx2/PCSX2\"\n    game_options = [{\n        \"option\": \"main_file\",\n        \"type\": \"file\",\n        \"label\": _(\"ISO file\"),\n        \"default_path\": \"game_path\",\n    }]\n\n    runner_options = [\n        {\n            \"option\": \"fullscreen\",\n            \"type\": \"bool\",\n            \"label\": _(\"Fullscreen\"),\n            \"default\": False,\n        },\n        {\n            \"option\": \"full_boot\",\n            \"type\": \"bool\",\n            \"label\": _(\"Fullboot\"),\n            \"default\": False\n        },\n        {\n            \"option\": \"nogui\",\n            \"type\": \"bool\",\n            \"label\": _(\"No GUI\"),\n            \"default\": False\n        },\n        {\n            \"option\": \"config_file\",\n            \"type\": \"file\",\n            \"label\": _(\"Custom config file\"),\n            \"advanced\": True,\n        },\n        {\n            \"option\": \"config_path\",\n            \"type\": \"directory_chooser\",\n            \"label\": _(\"Custom config path\"),\n            \"advanced\": True,\n        },\n    ]\n\n    def play(self):\n        arguments = [self.get_executable()]\n\n        if self.runner_config.get(\"fullscreen\"):\n            arguments.append(\"--fullscreen\")\n        if self.runner_config.get(\"full_boot\"):\n            arguments.append(\"--fullboot\")\n        if self.runner_config.get(\"nogui\"):\n            arguments.append(\"--nogui\")\n        if self.runner_config.get(\"config_file\"):\n            arguments.append(\"--cfg=%s\", self.runner_config[\"config_file\"])\n        if self.runner_config.get(\"config_path\"):\n            arguments.append(\"--cfgpath=%s\", self.runner_config[\"config_path\"])\n\n        iso = self.game_config.get(\"main_file\") or \"\"\n        if not system.path_exists(iso):\n            return {\"error\": \"FILE_NOT_FOUND\", \"file\": iso}\n        arguments.append(iso)\n        return {\"command\": arguments}\n", "path": "lutris/runners/pcsx2.py"}], "after_files": [{"content": "# Standard Library\nfrom gettext import gettext as _\n\n# Lutris Modules\nfrom lutris.runners.runner import Runner\nfrom lutris.util import system\n\n\nclass pcsx2(Runner):\n    human_name = _(\"PCSX2\")\n    description = _(\"PlayStation 2 emulator\")\n    platforms = [_(\"Sony PlayStation 2\")]\n    runnable_alone = True\n    runner_executable = \"pcsx2/PCSX2\"\n    game_options = [{\n        \"option\": \"main_file\",\n        \"type\": \"file\",\n        \"label\": _(\"ISO file\"),\n        \"default_path\": \"game_path\",\n    }]\n\n    runner_options = [\n        {\n            \"option\": \"fullscreen\",\n            \"type\": \"bool\",\n            \"label\": _(\"Fullscreen\"),\n            \"default\": False,\n        },\n        {\n            \"option\": \"full_boot\",\n            \"type\": \"bool\",\n            \"label\": _(\"Fullboot\"),\n            \"default\": False\n        },\n        {\n            \"option\": \"nogui\",\n            \"type\": \"bool\",\n            \"label\": _(\"No GUI\"),\n            \"default\": False\n        },\n        {\n            \"option\": \"config_file\",\n            \"type\": \"file\",\n            \"label\": _(\"Custom config file\"),\n            \"advanced\": True,\n        },\n        {\n            \"option\": \"config_path\",\n            \"type\": \"directory_chooser\",\n            \"label\": _(\"Custom config path\"),\n            \"advanced\": True,\n        },\n    ]\n\n    def play(self):\n        arguments = [self.get_executable()]\n\n        if self.runner_config.get(\"fullscreen\"):\n            arguments.append(\"--fullscreen\")\n        if self.runner_config.get(\"full_boot\"):\n            arguments.append(\"--fullboot\")\n        if self.runner_config.get(\"nogui\"):\n            arguments.append(\"--nogui\")\n        if self.runner_config.get(\"config_file\"):\n            arguments.append(\"--cfg={}\".format(self.runner_config[\"config_file\"]))\n        if self.runner_config.get(\"config_path\"):\n            arguments.append(\"--cfgpath={}\".format(self.runner_config[\"config_path\"]))\n\n        iso = self.game_config.get(\"main_file\") or \"\"\n        if not system.path_exists(iso):\n            return {\"error\": \"FILE_NOT_FOUND\", \"file\": iso}\n        arguments.append(iso)\n        return {\"command\": arguments}\n", "path": "lutris/runners/pcsx2.py"}]}