Stop ignoring Mouse parameters.

This commit is contained in:
jief666 2021-05-08 16:24:10 +03:00
parent 9906261e23
commit fd48766687
2 changed files with 11 additions and 7 deletions

View File

@ -1054,10 +1054,10 @@ EFI_STATUS ConfigManager::InitialisePlatform()
// }
//// }
// Why this overrides ? Should we remove the setting from config.plist ?
gSettings.GUI.Mouse.PointerEnabled = TRUE;
gSettings.GUI.Mouse.PointerSpeed = 2;
gSettings.GUI.Mouse.DoubleClickTime = 500; //TODO - make it constant as nobody change it
// // Why this overrides ? Should we remove the setting from config.plist ?
// gSettings.GUI.Mouse.PointerEnabled = TRUE;
// gSettings.GUI.Mouse.PointerSpeed = 2;
// gSettings.GUI.Mouse.DoubleClickTime = 500; //TODO - make it constant as nobody change it
if (gSettings.Devices.Audio.ResetHDA) ResetHDA();

View File

@ -35,10 +35,14 @@ public:
public:
virtual void getFields(XmlDictField** fields, size_t* nb) override { *fields = m_fields; *nb = sizeof(m_fields)/sizeof(m_fields[0]); };
int64_t dgetPointerSpeed() const { return Speed.isDefined() ? Speed.value() : 0; };
bool dgetPointerEnabled() const { return Enabled.isDefined() ? Enabled.value() ? dgetPointerSpeed() != 0 : false : dgetPointerSpeed() != 0 ; };
int64_t dgetPointerSpeed() const { return Speed.isDefined() ? Speed.value() : 2; };
bool dgetPointerEnabled() const {
if ( dgetPointerSpeed() <= 0 ) return false; // return false, whatever value Enabled has.
if ( Enabled.isDefined() ) return Enabled.value();
return true; // if !Enabled.isDefined(), return true because dgetPointerSpeed() > 0
}
bool dgetPointerMirror() const { return Mirror.isDefined() ? Mirror.value() : false; };
uint64_t dgetDoubleClickTime() const { return DoubleClickTime.isDefined() ? DoubleClickTime.value() : 0; };
uint64_t dgetDoubleClickTime() const { return DoubleClickTime.isDefined() ? DoubleClickTime.value() : 500; };
};
// -------------------------------------------------- Mouse class end