diff --git a/Themes/_fallback/Languages/de.ini b/Themes/_fallback/Languages/de.ini index f3da27d5c2..7723b256b2 100644 --- a/Themes/_fallback/Languages/de.ini +++ b/Themes/_fallback/Languages/de.ini @@ -327,6 +327,7 @@ AutoMapOnJoyChange=Als deze optie op &oq;Aan&cq; staat, zal het spel joysticks o AutoPlay=Deze optie is handig voor mensen die zonder mat willen spelen. Maar je kan geen nummers verdienen of scores vestigen als dit aan staat. AutogenGroupCourses=Laat de groep Zonder Stoppen en Eindeloos parkoers zien die door de Autogen gemaakt zijn. AutogenSteps=Genereer automatisch de stappen voor andere spel typen. +AxisFix=Workaround für einige Adapter, die das D-Pad auf Achsen mappen. Funktioniert noch nicht unter Mac OSX oder Linux JS Treiber. BGBrightness=Beheerst hoe fel de achtergrond er uit ziet. Zet dit lager als je de noten niet goed kan zien. Background=Verander de opties voor welke achtergrond tijdens het spelen zichtbaar is. BarDrain=BalkDrain @@ -814,6 +815,7 @@ AutoMapOnJoyChange=Automap Joysticks AutoPlay=AutoSpeel AutogenGroupCourses=Autogen Groep Parkoers AutogenSteps=Autogen Stappen +AxisFix=Achsen Fix BGBrightness=Helderheid Background=Achtergrond BarDrain=Balk Leeglopen diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index fd54bfaaea..6e9e154c8a 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -359,6 +359,7 @@ AutoMapOnJoyChange=If this setting is &oq;On&cq;, the game will remap joysticks AutoPlay=This option is useful for those who would like to play without using a pad. However, you will not be able to set high scores or earn extra stages while this option is ON. AutogenGroupCourses=Show group Nonstop and Endless courses that were created by Autogen. AutogenSteps=Automatically generate steps from other game types. +AxisFix=Workaround for some adapters which map the D-Pad to Axis. Does not work on Mac OSX or Linux JS driver yet. BGBrightness=Controls how bright the background will appear. Turn this setting down if you have a hard time seeing the notes. Background=Change options that control the backgrounds that play during gameplay. BackgroundFitMode=Change the way backgrounds are scaled to fit the screen. @@ -963,6 +964,7 @@ AutoMapOnJoyChange=Automap Joysticks AutoPlay=AutoPlay AutogenGroupCourses=Autogen Group Courses AutogenSteps=Autogen Steps +AxisFix=Axis Fix BGBrightness=Brightness Background=Background BackgroundFitMode=BG Fit Mode diff --git a/Themes/_fallback/Languages/es.ini b/Themes/_fallback/Languages/es.ini index 1e37e4f35b..d0b9823fec 100644 --- a/Themes/_fallback/Languages/es.ini +++ b/Themes/_fallback/Languages/es.ini @@ -354,6 +354,7 @@ AutoMapOnJoyChange=Si está activado, el juego redistribuirá los mandos que no AutoPlay=Esta opción es útil para quien quiera jugar sin plataforma. Sin embargo, no será posible optar a puntuaciones máximas o fases extra. AutogenGroupCourses=Mostrar cursos Sin parar e Infinitos creados con el generador automático. AutogenSteps=Genera los pasos automáticamente a partir de otros modos de juego. +AxisFix=Workaround for some adapters which map the D-Pad to Axis. Does not work on Mac OSX or Linux JS driver yet. BGBrightness=Controla el brillo del fondo. Regula esta opción si te cuesta ver las notas. Background=Cambia opciones que controlan los fondos que se reproducen mientras juegas. BarDrain=Drenado de barra. @@ -943,6 +944,7 @@ AutoMapOnJoyChange=Autoconfig. mandos AutoPlay=Autoreproducir AutogenGroupCourses=Autogen. grupo/cursos AutogenSteps=Autogenerar pasos +AxisFix=Axis Fix BGBrightness=Brillo Background=Fondo BarDrain=Drenado de barra diff --git a/Themes/_fallback/Languages/fr.ini b/Themes/_fallback/Languages/fr.ini index 9e4ad32fa7..98f4e0ff9d 100644 --- a/Themes/_fallback/Languages/fr.ini +++ b/Themes/_fallback/Languages/fr.ini @@ -356,6 +356,7 @@ AutoMapOnJoyChange=If this setting is &oq;On&cq;, the game will remap joysticks AutoPlay=This option is useful for those who would like to play without using a pad. However, you will not be able to set high scores or earn extra stages while this option is ON. AutogenGroupCourses=Show group Nonstop and Endless courses that were created by Autogen. AutogenSteps=Automatically generate steps from other game types. +AxisFix=Workaround for some adapters which map the D-Pad to Axis. Does not work on Mac OSX or Linux JS driver yet. BGBrightness=Controls how bright the background will appear. Turn this setting down if you have a hard time seeing the notes. Background=Change options that control the backgrounds that play during gameplay. BackgroundFitMode=Change the way backgrounds are scaled to fit the screen. @@ -1024,6 +1025,7 @@ HiddenSongs=Chansons Cachées EasterEggs=Oeufs de Pâque UseUnlockSystem=Déverrouiller le Système AutogenSteps=Pas Autogen +AxisFix=Axis Fix AutogenGroupCourses=Autogen Groupe de Parcours FastLoad=Chargement\nRapide diff --git a/Themes/_fallback/Languages/ja.ini b/Themes/_fallback/Languages/ja.ini index 4f4e151a91..10714827db 100644 --- a/Themes/_fallback/Languages/ja.ini +++ b/Themes/_fallback/Languages/ja.ini @@ -543,6 +543,7 @@ AllowSongDeletion=ミュージックホイールでCtrl+Backspaceキーを押す AllowW1=Fantastic判定の使用範囲を設定します。NEVERでは出なくなります。\nCOURSES ONLYではExtendedモードかOniモードのみで出ます。\nALWAYSではどのモードでも出ます。 AutogenGroupCourses=OnにするとExtendedモードとEndlessモードのコースが自動生成されます。 AutogenSteps=Onにすると他のゲームモードやスタイルから譜面が自動生成されます。 +AxisFix=Workaround for some adapters which map the D-Pad to Axis. Does not work on Mac OSX or Linux JS driver yet. DefaultFailType=IMMEDIATEはゲージが無くなると即終了します。\nDELAYEDはゲージがなくなってからもミスが続くと終了します。\n END OF SONGはゲージが切れても最後まで演奏が続きます。 DefaultFailTypeNoOff=IMMEDIATEはゲージが無くなると即終了します。30 MISSESはゲージがなくなってから30ミスすると終了します。\n END OF SONGはゲージが切れても最後まで演奏が続きます。 EasterEggs=このオプションをOnにして、Perfect以上で250コンボ繋ぐと…? @@ -1034,6 +1035,7 @@ AutoMapOnJoyChange=Automap Joysticks AutoPlay=AutoPlay AutogenGroupCourses=Autogen Group Courses AutogenSteps=Autogen Steps +AxisFix=Axis Fix BGBrightness=Brightness Background=Background BackgroundFitMode=BG Fit Mode diff --git a/Themes/_fallback/Languages/nl.ini b/Themes/_fallback/Languages/nl.ini index 5a9ffe35a2..f2a8f0df83 100644 --- a/Themes/_fallback/Languages/nl.ini +++ b/Themes/_fallback/Languages/nl.ini @@ -357,6 +357,7 @@ AutoMapOnJoyChange=Als deze optie op &oq;Aan&cq; staat, zal het spel joysticks o AutoPlay=Deze optie is handig voor mensen die zonder mat willen spelen. Maar je kan geen extra nummers verdienen of high scores opslaan als dit aan staat. AutogenGroupCourses=Laat de groep Nonstop en Eindeloos parkoers zien die door de Autogen gemaakt zijn. AutogenSteps=Genereer automatisch de stappen voor andere speltypen. +AxisFix=Workaround for some adapters which map the D-Pad to Axis. Does not work on Mac OSX or Linux JS driver yet. BGBrightness=Bepaalt hoe helder de achtergrond er uit ziet. Zet dit lager als je de noten niet goed kan zien. Background=Verander de opties die bepalen welke achtergronden tijdens het spelen zichtbaar zijn. BackgroundFitMode=Verander de manier waarop achtergronden worden geschaald om op het scherm te passen. @@ -678,6 +679,7 @@ Ask=Vraag AttackMines=AanvalMijnen Auto=Vanzelf Autogen To Fill Width=Autogen om mee te vullen +AxisFix=Axis Fix AutosyncMachine=AutosyncMachine Average Feet=Gemiddeld aantal Voeten Average=Gemiddeld diff --git a/Themes/_fallback/Languages/pl.ini b/Themes/_fallback/Languages/pl.ini index 985239bf01..9eb9f115c7 100644 --- a/Themes/_fallback/Languages/pl.ini +++ b/Themes/_fallback/Languages/pl.ini @@ -356,6 +356,7 @@ AutoMapOnJoyChange=Jeśli ta opcja jest włączona &oq;On&cq;, gra przemapuje au AutoPlay=Ta opcja może być użyteczna dla tych którzy z jakiegoś niezrozumiałego powodu chcą grać bez maty. W trybie AutoPlay nie da się zapisywać wyników ani zdobywać możliwości grania dodatkowych piosenek. AutogenGroupCourses=Pokazuje Maratony wygenerowane przez opcję AutoGen w grupach NonStop i Nieskończone. AutogenSteps=Automatyczne generowanie kroków dla innych typów gier nie uwzględnionych w stepchart`cie. +AxisFix=Workaround for some adapters which map the D-Pad to Axis. Does not work on Mac OSX or Linux JS driver yet. BGBrightness=Ustala poziom jasność filmów odtwarzanych w tle piosenki. Zmniejsz wartość opcji jeśli masz trudności z widzeniem strzałek. Background=Zmienia opcje kontrolujące tła odtwarzanych w trakcie gry. BackgroundFitMode=Zmień sposób skalowania tła do rozmiaru ekranu. @@ -947,6 +948,7 @@ AutoMapOnJoyChange=Automapowanie Joysticków AutoPlay=AutoPlay AutogenGroupCourses=Autogen. Grup Maratonów AutogenSteps=Autogen. Kroków +AxisFix=Axis Fix BGBrightness=Jasność Background=Tło BackgroundFitMode=Tryb dopasowania Tła diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index a3e2b79455..5e7399568e 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3115,7 +3115,7 @@ Line14="conf,ShowSongOptions" Fallback="ScreenOptionsServiceChild" NextScreen="ScreenOptionsService" PrevScreen="ScreenOptionsService" -LineNames="1,2,3,4,5,6,7" +LineNames="1,2,3,4,5,6,7,8" Line1="conf,AutoMapOnJoyChange" Line2="conf,OnlyDedicatedMenuButtons" Line3="conf,DelayedBack" @@ -3123,6 +3123,7 @@ Line4="conf,ArcadeOptionsNavigation" Line5="conf,ThreeKeyNavigation" Line6="conf,MusicWheelSwitchSpeed" Line7="conf,InputDebounceTime" +Line8="conf,AxisFix" [ScreenOptionsArcade] Fallback="ScreenOptionsServiceChild" diff --git a/src/ScreenOptionsMasterPrefs.cpp b/src/ScreenOptionsMasterPrefs.cpp index 1d2f1775ad..8209f04861 100644 --- a/src/ScreenOptionsMasterPrefs.cpp +++ b/src/ScreenOptionsMasterPrefs.cpp @@ -775,6 +775,7 @@ static void InitializeConfOptions() ADD( ConfOption( "ThreeKeyNavigation", MovePref, "Five Key Menu", "Three Key Menu" ) ); ADD( ConfOption( "MusicWheelSwitchSpeed", MusicWheelSwitchSpeed, "Slow","Normal","Fast","Really Fast" ) ); ADD( ConfOption( "InputDebounceTime", InputDebounceTime, "0ms", "10ms", "20ms", "30ms", "40ms", "50ms", "60ms", "70ms", "80ms", "90ms", "100ms") ); + ADD( ConfOption( "AxisFix", MovePref, "Off","On" ) ); // Gameplay options ADD( ConfOption( "Center1Player", MovePref, "Off","On" ) ); diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 36beaae176..a7c6deff20 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -10,11 +10,13 @@ #include "archutils/Win32/RegistryAccess.h" #include "InputFilter.h" #include "PrefsManager.h" +#include "GamePreferences.h" //needed for Axis Fix #include "Foreach.h" #include "InputHandler_DirectInputHelper.h" REGISTER_INPUT_HANDLER_CLASS2( DirectInput, DInput ); +static Preference g_bAxisFix( "AxisFix", false ); static vector Devices; @@ -587,8 +589,17 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm device.m_sName.c_str(), in.ofs ); float l = SCALE( int(evtbuf[i].dwData), 0.0f, 100.0f, 0.0f, 1.0f ); - ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); - ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); + if(g_bAxisFix) + { + ButtonPressed( DeviceInput(dev, up, (l == 0) || (l == -1), tm) ); + ButtonPressed( DeviceInput(dev, down,(l == 0) || (l == 1), tm) ); + + } + else + { + ButtonPressed( DeviceInput(dev, up, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, down, max(+l,0), tm) ); + } } break; } diff --git a/src/arch/InputHandler/InputHandler_Linux_Event.cpp b/src/arch/InputHandler/InputHandler_Linux_Event.cpp index 77acb14461..4f26f60831 100644 --- a/src/arch/InputHandler/InputHandler_Linux_Event.cpp +++ b/src/arch/InputHandler/InputHandler_Linux_Event.cpp @@ -3,6 +3,7 @@ #include "RageLog.h" #include "RageUtil.h" #include "LinuxInputManager.h" +#include "GamePreferences.h" //needed for Axis Fix #include #include @@ -13,6 +14,7 @@ #include REGISTER_INPUT_HANDLER_CLASS2( LinuxEvent, Linux_Event ); +static Preference g_bAxisFix( "AxisFix", false ); static RString BustypeToString( int iBus ) { @@ -409,8 +411,16 @@ void InputHandler_Linux_Event::InputThread() DeviceButton pos = g_apEventDevices[i]->aiAbsMappingHigh[event.code]; float l = SCALE( int(event.value), (float) g_apEventDevices[i]->aiAbsMin[event.code], (float) g_apEventDevices[i]->aiAbsMax[event.code], -1.0f, 1.0f ); - ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, neg, max(-l,0), now) ); - ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, pos, max(+l,0), now) ); + if (g_bAxisFix) + { + ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, neg, (l < -0.5)||((l > 0.0001)&&(l < 0.5)), now) ); //Up if between 0.0001 and 0.5 or if less than -0.5 + ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, pos, (l > 0.5)||((l > 0.0001)&&(l < 0.5)) , now) ); //Down if between 0.0001 and 0.5 or if more than 0.5 + } + else + { + ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, neg, max(-l,0), now) ); + ButtonPressed( DeviceInput(g_apEventDevices[i]->m_Dev, pos, max(+l,0), now) ); + } break; } }