Disable WII Lightgun hack by default (#5056)

This commit is contained in:
Kiall Mac Innes 2019-05-14 21:55:59 +01:00 committed by R. Belmont
parent 0c86462c1f
commit 16bbe847ef
4 changed files with 29 additions and 1 deletions

View File

@ -36,6 +36,7 @@
# USE_QTDEBUG = 1
# NO_X11 = 1
# NO_USE_XINPUT = 1
# NO_USE_XINPUT_WII_LIGHTGUN_HACK = 1
# FORCE_DRC_C_BACKEND = 1
# DEBUG = 1
@ -745,6 +746,10 @@ ifdef NO_USE_XINPUT
PARAMS += --NO_USE_XINPUT='$(NO_USE_XINPUT)'
endif
ifdef NO_USE_XINPUT_WII_LIGHTGUN_HACK
PARAMS += --NO_USE_XINPUT_WII_LIGHTGUN_HACK='$(NO_USE_XINPUT_WII_LIGHTGUN_HACK)'
endif
ifdef SDL_LIBVER
PARAMS += --SDL_LIBVER='$(SDL_LIBVER)'
endif

View File

@ -177,6 +177,19 @@ if not _OPTIONS["NO_USE_XINPUT"] then
end
end
newoption {
trigger = "NO_USE_XINPUT_WII_LIGHTGUN_HACK",
description = "Disable use of Xinput Wii Lightgun Hack",
allowed = {
{ "0", "Enable Xinput Wii Lightgun Hack" },
{ "1", "Disable Xinput Wii Lightgun Hack" },
},
}
if not _OPTIONS["NO_USE_XINPUT_WII_LIGHTGUN_HACK"] then
_OPTIONS["NO_USE_XINPUT_WII_LIGHTGUN_HACK"] = "1"
end
newoption {
trigger = "SDL2_MULTIAPI",
description = "Use couriersud's multi-keyboard patch for SDL 2.1? (this API was removed prior to the 2.0 release)",

View File

@ -52,6 +52,16 @@ else
}
end
if _OPTIONS["NO_USE_XINPUT_WII_LIGHTGUN_HACK"]=="1" then
defines {
"USE_XINPUT_WII_LIGHTGUN_HACK=0",
}
else
defines {
"USE_XINPUT_WII_LIGHTGUN_HACK=1",
}
end
if _OPTIONS["NO_USE_MIDI"]~="1" and _OPTIONS["targetos"]=="linux" then
buildoptions {
backtick(pkgconfigcmd() .. " --cflags alsa"),

View File

@ -356,7 +356,7 @@ void sdl_window_info::modify_prescale(int dir)
void sdl_window_info::update_cursor_state()
{
#if (USE_XINPUT)
#if (USE_XINPUT && USE_XINPUT_WII_LIGHTGUN_HACK)
// Hack for wii-lightguns:
// they stop working with a grabbed mouse;
// even a ShowCursor(SDL_DISABLE) already does this.