获取控制器信息 / Get controller information Returns: Dict[str, Any]: 控制器信息,包含类型、构造参数等 Controller information including type, constructor parameters, etc. Raises: RuntimeError: 如果获取失败
(self)
| 417 | |
| 418 | @property |
| 419 | def info(self) -> dict[str, Any]: |
| 420 | """获取控制器信息 / Get controller information |
| 421 | |
| 422 | Returns: |
| 423 | Dict[str, Any]: 控制器信息,包含类型、构造参数等 |
| 424 | Controller information including type, constructor parameters, etc. |
| 425 | |
| 426 | Raises: |
| 427 | RuntimeError: 如果获取失败 |
| 428 | """ |
| 429 | buffer = StringBuffer() |
| 430 | if not Library.framework().MaaControllerGetInfo(self._handle, buffer._handle): |
| 431 | raise RuntimeError("Failed to get controller info.") |
| 432 | return json.loads(buffer.get()) |
| 433 | |
| 434 | @property |
| 435 | def resolution(self) -> tuple[int, int]: |
nothing calls this directly
no test coverage detected