Skip to content

Input: Reuse framework input for events and camera controls - #160

Draft
zpl-zak wants to merge 4 commits into
masterfrom
feature/unified-native-input
Draft

zpl-zak wants to merge 4 commits into
masterfrom
feature/unified-native-input

Conversation

@zpl-zak

@zpl-zak zpl-zak commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

MafiaMP duplicates its window-message input backend and polls camera controls directly through Win32. Mouse messages use the modifier mask as an array index and repeated keydowns create repeated press edges. This reuses framework acquisition and routes camera controls through the common IInput query API.

Changes

  • Derive GameInput from framework WindowInput, retaining native locking and cursor presentation.
  • Reuse stable mouse-button indexing, mouse key state, repeat filtering, modifier aggregation, focus recovery and signed client coordinates.
  • Use physical framework codes for mod controls. Query camera-studio movement, mouse buttons and modifiers directly through IInput::IsKeyDown and existing FW_KEY_* macros, with native conversion inside the adapter.
  • Add a gameplay-input gate covering native control locks, including the custom chat's existing hold, alongside the framework baseline.
  • Add/update the framework source pin in separate dependency commits.

Dependency and scope

Depends on Framework #292, pinned to 689c27139ba8e0123e33cfb54f869d27f15c7001 for review. Existing build paths must use that checkout; merge Framework first and replace the review pin with its merged commit before release. VERSION is unchanged.

MafiaMP is excluded from the framework's discovered projects by IGNORE. This draft covers input migration; compatibility of the entire legacy project with current Framework APIs is not established. Existing widget/frame timing, camera math, cursor movement and custom chat UI remain unchanged. Complete ChatBox/CEF migrations remain follow-ups.

Validation

The shared implementation was built and tested in Framework #292: 12 portable cases passed on Linux; the canonical MSVC x64 Debug input unit target ran under Wine with 30 cases passed and one real English/Russian/AZERTY layout case skipped. The runner includes the skipped case in its aggregate total of 31, so it is not counted here as verified layout coverage.

git diff --check passed. No client, launcher, server or stress executable was launched. No full game-target build or runtime integration result is claimed. Native Windows compilation, real keyboard-layout behavior and in-game focus/UI transitions still need validation.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zpl-zak zpl-zak changed the title Input: Reuse framework events and physical camera controls Input: Reuse framework input for events and camera controls Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant