Skip to content

Commit

Permalink
Don't assign XInput mapping to SynPS/2 Synaptics TouchPad
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Oct 16, 2023
1 parent 008e720 commit febed33
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
'x86' { $arch = 'Win32' }
'x64' {
$arch = 'x64'
if(($archext -eq 'SSE') -or ($archext -eq 'SSE2')) {
if(($archexts -eq 'SSE') -or ($archexts -eq 'SSE2')) {
$archexts = ''
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
'x86' { $arch = 'Win32' }
'x64' {
$arch = 'x64'
if(($archext -eq 'SSE') -or ($archext -eq 'SSE2')) {
if(($archexts -eq 'SSE') -or ($archexts -eq 'SSE2')) {
$archexts = ''
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows_v143.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
'x86' { $arch = 'Win32' }
'x64' {
$arch = 'x64'
if(($archext -eq 'SSE') -or ($archext -eq 'SSE2')) {
if(($archexts -eq 'SSE') -or ($archexts -eq 'SSE2')) {
$archexts = ''
}
}
Expand Down
14 changes: 7 additions & 7 deletions Sources/Jazz2/Actors/ActorBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ namespace Jazz2::Actors
_currentTransitionState = AnimState::Idle;

if (_currentTransitionCallback != nullptr) {
auto oldCallback = _currentTransitionCallback;
auto oldCallback = std::move(_currentTransitionCallback);
_currentTransitionCallback = nullptr;
oldCallback();
}
Expand Down Expand Up @@ -511,7 +511,7 @@ namespace Jazz2::Actors
}

if (_currentTransitionCallback != nullptr) {
auto oldCallback = _currentTransitionCallback;
auto oldCallback = std::move(_currentTransitionCallback);
_currentTransitionCallback = nullptr;
oldCallback();
}
Expand Down Expand Up @@ -541,7 +541,7 @@ namespace Jazz2::Actors
}

if (_currentTransitionCallback != nullptr) {
auto oldCallback = _currentTransitionCallback;
auto oldCallback = std::move(_currentTransitionCallback);
_currentTransitionCallback = nullptr;
oldCallback();
}
Expand All @@ -568,7 +568,7 @@ namespace Jazz2::Actors
}

if (_currentTransitionCallback != nullptr) {
auto oldCallback = _currentTransitionCallback;
auto oldCallback = std::move(_currentTransitionCallback);
_currentTransitionCallback = nullptr;
oldCallback();
}
Expand Down Expand Up @@ -596,7 +596,7 @@ namespace Jazz2::Actors
}

if (_currentTransitionCallback != nullptr) {
auto oldCallback = _currentTransitionCallback;
auto oldCallback = std::move(_currentTransitionCallback);
_currentTransitionCallback = nullptr;
oldCallback();
}
Expand All @@ -616,7 +616,7 @@ namespace Jazz2::Actors
{
if (_currentTransitionState != AnimState::Idle && _currentTransitionCancellable) {
if (_currentTransitionCallback != nullptr) {
auto oldCallback = _currentTransitionCallback;
auto oldCallback = std::move(_currentTransitionCallback);
_currentTransitionCallback = nullptr;
oldCallback();
}
Expand Down Expand Up @@ -653,7 +653,7 @@ namespace Jazz2::Actors
RefreshAnimation();

if (_currentTransitionCallback != nullptr) {
auto oldCallback = _currentTransitionCallback;
auto oldCallback = std::move(_currentTransitionCallback);
_currentTransitionCallback = nullptr;
oldCallback();
}
Expand Down
1 change: 1 addition & 0 deletions Sources/nCine/Input/JoyMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ namespace nCine
// Razer keyboards and mice, and VMware virtual devices on Linux/BSD are incorrectly recognized as joystick in some cases, don't assign XInput mapping to them
const StringView joyNameView = joyName;
if ((joyNameView.contains("Razer "_s) && (joyNameView.contains("Keyboard"_s) || joyNameView.contains("DeathAdder"_s))) ||
(joyNameView == "SynPS/2 Synaptics TouchPad"_s) ||
(joyNameView == "VMware Virtual USB Mouse"_s)) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/nCine/Threading/WindowsThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ namespace nCine
return;
}

// Don't use SetThreadDescription() yet, because the functions was introduced in Windows 10, version 1607
// Don't use SetThreadDescription() yet, because the function was introduced in Windows 10, version 1607
//# if defined(NTDDI_WIN10_RS2) && NTDDI_VERSION >= NTDDI_WIN10_RS2
#if 0
wchar_t buffer[MaxThreadNameLength];
size_t charsConverted;
mbstowcs_s(&charsConverted, buffer, name, MaxThreadNameLength);
const HANDLE threadHandle = (handle != reinterpret_cast<HANDLE>(-1)) ? handle : GetCurrentThread();
const HANDLE threadHandle = (handle != reinterpret_cast<HANDLE>(-1)) ? handle : ::GetCurrentThread();
::SetThreadDescription(threadHandle, buffer);
# elif !defined(DEATH_TARGET_MINGW)
constexpr DWORD MS_VC_EXCEPTION = 0x406D1388;
Expand Down

0 comments on commit febed33

Please sign in to comment.