USB/LightGun/GunCon2: Fix wrong code of GunCon2. (#8066)

240 is used for the default screen height elsewhere in the file.
BID_SHOOT_OFFSCREEN is already handled at line 295.
This commit is contained in:
eyfix 2023-02-07 14:21:48 +09:00 committed by GitHub
parent ee73c5c1b5
commit a4f1f383a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ namespace usb_lightgun
};
static constexpr s32 DEFAULT_SCREEN_WIDTH = 640;
static constexpr s32 DEFAULT_SCREEN_HEIGHT = 480;
static constexpr s32 DEFAULT_SCREEN_HEIGHT = 240;
static constexpr float DEFAULT_CENTER_X = 320.0f;
static constexpr float DEFAULT_CENTER_Y = 120.0f;
static constexpr float DEFAULT_SCALE_X = 100.0f;
@ -359,7 +359,7 @@ namespace usb_lightgun
GSTranslateWindowToDisplayCoordinates(abs_pos.first, abs_pos.second, &pointer_x, &pointer_y);
s16 pos_x, pos_y;
if (pointer_x < 0.0f || pointer_y < 0.0f || (button_state & BID_SHOOT_OFFSCREEN))
if (pointer_x < 0.0f || pointer_y < 0.0f)
{
// off-screen
pos_x = 0;