5 Commits

Author SHA1 Message Date
Renovate Bot
b1e94b16b0 fix(deps): update dependency pillow to v12
All checks were successful
Code check / Check code (push) Successful in 1m14s
2025-11-09 17:57:34 +05:00
Renovate Bot
a74c43b972 chore(deps): update https://gitea.com/actions/setup-python action to v6 2025-11-09 17:57:02 +05:00
Renovate Bot
15938ba376 chore(deps): update https://gitea.com/actions/setup-node action to v6 2025-11-09 17:56:31 +05:00
Renovate Bot
128c4fde19 chore(deps): update archlinux:base-devel docker digest to 943bdad
All checks were successful
Code check / Check code (pull_request) Successful in 1m8s
2025-11-09 00:01:20 +00:00
dde43f69d1 feat: trigger emulation by Xbox + B
All checks were successful
Code check / Check code (push) Successful in 1m17s
renovate / renovate (push) Successful in 1m36s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-11-07 22:22:38 +05:00
9 changed files with 517 additions and 499 deletions

View File

@@ -94,7 +94,7 @@ jobs:
name: Build Arch Package
runs-on: ubuntu-22.04
container:
image: archlinux:base-devel@sha256:87a967f07ba6319fc35c8c4e6ce6acdb4343b57aa817398a5d2db57bd8edc731
image: archlinux:base-devel@sha256:943bdad9e9d0d23503f24797b44ce2cc1531bf101e18b3e7fb8c8776190dc45e
volumes:
- /usr:/usr-host
- /opt:/opt-host

View File

@@ -19,7 +19,7 @@ jobs:
uses: https://gitea.com/actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up Python
uses: https://gitea.com/actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
uses: https://gitea.com/actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version-file: "pyproject.toml"

View File

@@ -138,7 +138,7 @@ jobs:
needs: changes
if: needs.changes.outputs.arch == 'true' || github.event_name == 'workflow_dispatch'
container:
image: archlinux:base-devel@sha256:87a967f07ba6319fc35c8c4e6ce6acdb4343b57aa817398a5d2db57bd8edc731
image: archlinux:base-devel@sha256:943bdad9e9d0d23503f24797b44ce2cc1531bf101e18b3e7fb8c8776190dc45e
volumes:
- /usr:/usr-host
- /opt:/opt-host

View File

@@ -23,7 +23,7 @@ jobs:
- uses: https://gitea.com/actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up Node.js
uses: https://gitea.com/actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
uses: https://gitea.com/actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: 20

View File

@@ -14,7 +14,7 @@ jobs:
uses: https://gitea.com/actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up Python
uses: https://gitea.com/actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
uses: https://gitea.com/actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version-file: "pyproject.toml"

View File

@@ -13,7 +13,7 @@ jobs:
- uses: https://gitea.com/actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up Node.js
uses: https://gitea.com/actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
uses: https://gitea.com/actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: 20

View File

@@ -131,6 +131,9 @@ class InputManager(QObject):
self.last_update = time.time()
self.update_interval = 0.016 # ~60 FPS
self.emulation_active = False # Flag for external focus (updated in main thread)
self.emulation_triggered = False
self.back_held = False
self.guide_held = False
# Focus check timer for emulation flag (runs in main thread)
self.focus_check_timer = QTimer(self)
@@ -182,6 +185,8 @@ class InputManager(QObject):
"""Update emulation_active flag based on Qt app focus (main thread only)."""
active = QApplication.activeWindow()
self.emulation_active = (active is None) # True for external windows (e.g., winefile)
if not self.emulation_active:
self.emulation_triggered = False
def _navigate_game_cards(self, container, tab_index: int, code: int, value: int) -> None:
"""Common navigation logic for game cards in a container."""
@@ -1853,6 +1858,17 @@ class InputManager(QObject):
# UI signal handling (always, for internal app)
if event.type == ecodes.EV_KEY:
if event.code == ecodes.BTN_EAST: # Back button
self.back_held = (event.value == 1)
if event.code in BUTTONS['guide']:
self.guide_held = (event.value == 1)
if event.value == 1:
if ((event.code in BUTTONS['guide'] and self.back_held) or
(event.code == ecodes.BTN_EAST and self.guide_held)):
self.emulation_triggered = not self.emulation_triggered
self.button_event.emit(event.code, event.value)
# Special handling for menu on press only
if event.value == 1 and event.code in BUTTONS['menu'] and not self._is_gamescope_session:
@@ -1881,8 +1897,8 @@ class InputManager(QObject):
else:
self.dpad_moved.emit(event.code, event.value, current_time)
# Mouse emulation (only for external windows)
if self.mouse_emulation_enabled and self.emulation_active:
# Mouse emulation (only for external windows + triggered)
if self.mouse_emulation_enabled and self.emulation_active and self.emulation_triggered:
if event.type == ecodes.EV_ABS:
if event.code == ecodes.ABS_HAT0X:
if event.value == -1:
@@ -1920,6 +1936,9 @@ class InputManager(QObject):
self.stick_x_raw = 0
self.stick_y_raw = 0
self.scroll_accumulator = 0.0
self.back_held = False
self.guide_held = False
self.emulation_triggered = False
break
except Exception as ex:
logger.error(f"Unexpected error in gamepad monitoring: {ex}")
@@ -1938,6 +1957,9 @@ class InputManager(QObject):
except Exception:
pass
self.gamepad = None
self.back_held = False
self.guide_held = False
self.emulation_triggered = False
def cleanup(self) -> None:
"""

View File

@@ -32,7 +32,7 @@ dependencies = [
"icoextract>=0.2.0",
"numpy>=2.2.4",
"orjson>=3.11.3",
"pillow>=11.3.0",
"pillow>=12.0.0",
"psutil>=7.1.0",
"pyside6==6.9.1",
"pyudev>=0.24.3",

976
uv.lock generated

File diff suppressed because it is too large Load Diff