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

Add setting to configure simulated key-up delay for mouse wheel events #18585

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,7 @@ static const ConfigSetting controlSettings[] = {
ConfigSetting("ConfineMap", &g_Config.bMouseConfine, false, CfgFlag::PER_GAME),
ConfigSetting("MouseSensitivity", &g_Config.fMouseSensitivity, 0.1f, CfgFlag::PER_GAME),
ConfigSetting("MouseSmoothing", &g_Config.fMouseSmoothing, 0.9f, CfgFlag::PER_GAME),
ConfigSetting("MouseWheelUpDelayMs", &g_Config.iMouseWheelUpDelayMs, 80, CfgFlag::PER_GAME),

ConfigSetting("SystemControls", &g_Config.bSystemControls, true, CfgFlag::DEFAULT),
ConfigSetting("RapidFileInterval", &g_Config.iRapidFireInterval, 5, CfgFlag::DEFAULT),
Expand Down
1 change: 1 addition & 0 deletions Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ struct Config {
bool bMouseConfine; // Trap inside the window.
float fMouseSensitivity;
float fMouseSmoothing;
int iMouseWheelUpDelayMs;

bool bSystemControls;
int iRapidFireInterval;
Expand Down
8 changes: 7 additions & 1 deletion UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,11 @@ void GameSettingsScreen::CreateControlsSettings(UI::ViewGroup *controlsSettings)
bool enableMouseSettings = false;
#endif
if (enableMouseSettings) {
// The mousewheel button-release setting is independent of actual mouse delta control.
controlsSettings->Add(new ItemHeader(co->T("Mouse", "Mouse settings")));
auto wheelUpDelaySlider = controlsSettings->Add(new PopupSliderChoice(&g_Config.iMouseWheelUpDelayMs, 10, 300, 1, co->T("Mouse wheel button-release delay"), screenManager()));
wheelUpDelaySlider->SetFormat(di->T("%d ms"));

CheckBox *mouseControl = controlsSettings->Add(new CheckBox(&g_Config.bMouseControl, co->T("Use Mouse Control")));
mouseControl->OnClick.Add([=](EventParams &e) {
if (g_Config.bMouseControl)
Expand Down Expand Up @@ -919,9 +923,11 @@ void GameSettingsScreen::CreateNetworkingSettings(UI::ViewGroup *networkingSetti
}
#endif

auto di = GetI18NCategory(I18NCat::DIALOG);

networkingSettings->Add(new ItemHeader(n->T("Misc", "Misc (default = compatibility)")));
networkingSettings->Add(new PopupSliderChoice(&g_Config.iPortOffset, 0, 60000, 10000, n->T("Port offset", "Port offset (0 = PSP compatibility)"), 100, screenManager()));
networkingSettings->Add(new PopupSliderChoice(&g_Config.iMinTimeout, 0, 15000, 0, n->T("Minimum Timeout", "Minimum Timeout (override in ms, 0 = default)"), 50, screenManager()));
networkingSettings->Add(new PopupSliderChoice(&g_Config.iMinTimeout, 0, 15000, 0, n->T("Minimum Timeout", "Minimum Timeout (override in ms, 0 = default)"), 50, screenManager()))->SetFormat(di->T("%d ms"));
networkingSettings->Add(new CheckBox(&g_Config.bForcedFirstConnect, n->T("Forced First Connect", "Forced First Connect (faster Connect)")));
}

Expand Down
4 changes: 2 additions & 2 deletions UI/NativeApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,6 @@ void NativeTouch(const TouchInput &touch) {

// up, down
static double g_wheelReleaseTime[2]{};
static const double RELEASE_TIME = 0.1; // about 3 frames at 30hz.

static void ProcessWheelRelease(InputKeyCode keyCode, double now, bool keyPress) {
int dir = keyCode - NKCODE_EXT_MOUSEWHEEL_UP;
Expand All @@ -1283,7 +1282,8 @@ static void ProcessWheelRelease(InputKeyCode keyCode, double now, bool keyPress)
}

if (keyPress) {
g_wheelReleaseTime[dir] = now + RELEASE_TIME;
float releaseTime = (float)g_Config.iMouseWheelUpDelayMs * (1.0f / 1000.0f);
g_wheelReleaseTime[dir] = now + releaseTime;
}
}

Expand Down
2 changes: 2 additions & 0 deletions android/src/org/ppsspp/ppsspp/NativeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,8 @@ public boolean processCommand(String command, String params) {
throw new Exception();
} catch (Exception e) {
NativeApp.reportException(e, params);


}
}
return false;
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/ar_AE.ini
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Low end radius = Low end radius
Mouse = ‎إعدادات الماوس
Mouse sensitivity = ‎حساسية الماوس
Mouse smoothing = ‎تنعيم حركة الماوس
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = ‎'M'يمكنك الأن تخطيط الماوس في شاشة التخطيط عن طريق أيقونة .
None (Disabled) = ‎لا شئ (معطل)
Off = ‎مغلق
Expand Down Expand Up @@ -349,6 +350,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = ‎* PSP حجم
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/az_AZ.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/bg_BG.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = Нищо (изключено)
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/ca_ES.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Ràdio inferior
Mouse = Configuració del ratolí
Mouse sensitivity = Sensibilitat del ratolí
Mouse smoothing = Suavitat del ratolí
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Podeu mapejar el ratolí als paràmetres de control prement la icona 'M'.
None (Disabled) = Desactivat
Off = No
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d segons
* PSP res = * resolució PSP
Active = Actiu
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/cz_CZ.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = Žádné (zakázáno)
Off = Vypnuto
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d vteřin
* PSP res = * PSP rozlišení
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/da_DK.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Instillinger af mus
Mouse sensitivity = Følsomhed af muss
Mouse smoothing = Udjævning af mus
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Du kan nu mappe musen i kontrol mapningsskærmen ved at trykke på 'M' ikonet.
None (Disabled) = Ingen (deaktiveret)
Off = Slukket
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d sekunder
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/de_DE.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Einstellung für Maussteuerung
Mouse sensitivity = Mausempfindlichkeit
Mouse smoothing = Mausglättung
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Nun können Sie in der Tastenbelegung die Maustasten benutzen in dem Sie auf das 'M' Symbol klicken.
None (Disabled) = Kein (Deaktiviert)
Off = Aus
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d Sekunden
* PSP res = * PSP Auflösung
Active = Aktiv
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/dr_ID.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/en_US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
Expand Down Expand Up @@ -365,6 +366,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/es_ES.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Radio inferior
Mouse = Ajustes de ratón
Mouse sensitivity = Sensibilidad del ratón
Mouse smoothing = Suavidad del ratón
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Puedes mapear el ratón en los ajustes de controles presionando el icono 'M'.
None (Disabled) = Desactivado
Off = No
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d segundos
* PSP res = * resolución PSP
Active = Activo
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/es_LA.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Radio inferior
Mouse = Ajustes de ratón
Mouse sensitivity = Sensibilidad del ratón
Mouse smoothing = Suavidad del ratón
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Puedes controlar el ratón en la pantalla de controles presionando el icono 'M'.
None (Disabled) = Desactivado
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Activo
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/fa_IR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = شعاع کم پایان
Mouse = ‎تنظیمات موس
Mouse sensitivity = ‎حساسیت موس
Mouse smoothing = ‎روان کردن حرکت موس
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = ‎در قسمت تنظیمات کنترلر میتوانید از دکمه های موس استفاده کنید M با انتخاب آیکون
None (Disabled) = ‎هیچ کدام (غیر فعال)
Off = ‎خاموش
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/fi_FI.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Hiiren herkkyys
Mouse smoothing = Hiiren tasoitus
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Pois
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/fr_FR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Paramètres de la souris
Mouse sensitivity = Sensibilité de la souris
Mouse smoothing = Lissage du déplacement de la souris
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Vous pouvez maintenant utiliser la souris dans l'écran de réassignation des touches en cliquant sur le bouton "M".
None (Disabled) = Désactivée
Off = Désactivé
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d secondes
* PSP res = × définition PSP
Active = Actif
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/gl_ES.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = Desactivado
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/gr_EL.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Ρυθμίσεις ποντικιού
Mouse sensitivity = Ευαισθησία ποντικιού
Mouse smoothing = Εξομάλυνση ποντικιού
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Τωρα μπορείτε να ρυθμίσετε το ποντίκι στην οθόνη χαρτογράφησης ελέγχου πατώντας το εικονίδιο "M".
None (Disabled) = Κανένα (απενεργοποιημένο)
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d δευτερόλεπτα
* PSP res = * ανάλυση PSP
Active = ΕΝΕΡΓΟ
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/he_IL.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/he_IL_invert.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Mouse settings
Mouse sensitivity = Mouse sensitivity
Mouse smoothing = Mouse smoothing
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = You can now map mouse in control mapping screen by pressing the 'M' icon.
None (Disabled) = None (disabled)
Off = Off
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/hr_HR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Postavke miša
Mouse sensitivity = Senzitivnost miša
Mouse smoothing = Izglađivanje miša
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Sada možeš postaviti miš u ekranu postavljanja kontroli pritiskajuci 'M' tipku.
None (Disabled) = Nema (Isključeno)
Off = Isključeno
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d sekundi
* PSP res = * PSP res
Active = Aktivno
Expand Down
2 changes: 2 additions & 0 deletions assets/lang/hu_HU.ini
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Low end radius = Low end radius
Mouse = Egér beállítások
Mouse sensitivity = Egér érzékenység
Mouse smoothing = Egér simítás
Mouse wheel button-release delay = Mouse wheel button-release delay
MouseControl Tip = Az 'M' ikonra kattintva egérgombokat is társíthatsz a különböző gombokhoz.
None (Disabled) = Nincs (letiltva)
Off = Ki
Expand Down Expand Up @@ -341,6 +342,7 @@ Vertex = Vertex
VFPU = VFPU

[Dialog]
%d ms = %d ms
%d seconds = %d másodpercig
* PSP res = * PSP felbontás
Active = Aktív
Expand Down
Loading