Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for the lightgun input device #2294

Merged
merged 6 commits into from Nov 29, 2021

Conversation

ergo720
Copy link
Member

@ergo720 ergo720 commented Nov 20, 2021

This adds support for a new input device, the lightgun, specifically the EMS TopGun II documented in the xboxdevwiki. The laser pointer of the gun is also emulated as a circle drawn as an Imgui overlay over the rendering window, so that players can know where they are shooting at on the rendering window. Note that this will only work with xbox games that use xinput to control the lightgun, and thus it won't work with chihiro games that use JVS input instead.

Known xbox games that support lightguns are:

  • Starsky & Hutch
  • The House of the Dead III (xbox version, also contain The House of the Dead II)
  • Silent Scope Complete (contain 3 titles).

@github-actions github-actions bot added cmake cmake graphics GPU and/or game graphics related HLE High Level Emulation input USB and/or game input related kernel xbox kernel related LLE Low Level Emulation modules submodules user interface GUI related labels Nov 20, 2021
@LanHikariDS
Copy link
Contributor

LanHikariDS commented Nov 21, 2021

Tested against GunValkyrie and Steel Battalion, two titles that had controller issues that were fixed within the past year. Neither title shows input-based regressions in this PR.

@ergo720 ergo720 force-pushed the lightgun branch 2 times, most recently from beef3b5 to a1c838a Compare November 21, 2021 10:48
LukeUsher
LukeUsher previously approved these changes Nov 28, 2021
src/core/hle/D3D8/Direct3D9/Direct3D9.cpp Outdated Show resolved Hide resolved
src/devices/video/EmuNV2A_PGRAPH.cpp Outdated Show resolved Hide resolved
src/core/kernel/exports/EmuKrnlHal.cpp Outdated Show resolved Hide resolved
src/core/common/imgui/ui.cpp Outdated Show resolved Hide resolved
src/common/win32/EmuShared.h Show resolved Hide resolved
PatrickvL
PatrickvL previously approved these changes Nov 28, 2021
Copy link
Member

@PatrickvL PatrickvL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few small remarks, and admittedly I didn't review very thoroughly, but this looks fine

@ergo720 ergo720 dismissed stale reviews from PatrickvL and LukeUsher via 0b2c0a2 November 29, 2021 13:45
@github-actions github-actions bot removed graphics GPU and/or game graphics related LLE Low Level Emulation labels Nov 29, 2021
Copy link
Member

@RadWolfie RadWolfie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM

@RadWolfie RadWolfie merged commit c9fe07a into Cxbx-Reloaded:master Nov 29, 2021
@ergo720 ergo720 deleted the lightgun branch November 30, 2021 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake cmake HLE High Level Emulation input USB and/or game input related kernel xbox kernel related modules submodules user interface GUI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants