Page MenuHomeWildfire Games

Fix hotkeys not releasing properly.
ClosedPublic

Authored by wraitii on Jan 16 2021, 11:29 AM.

Details

Reviewers
None
Commits
rP24645: Fix hotkeys not releasing properly.
Trac Tickets
#5922
Summary

rP24215 changed hotkeys to use scancode, but didn't change g_keys to reflect that, and this could lead to brokenness.
This fixes that by explicitly using scancodes. Note that we might want a g_keys map in the future, but it seems un-necessary at the moment.

Also remove the last remnants of 'negated' hotkeys, which were disabled following rP15980.

Test Plan

See ticket

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Jan 16 2021, 11:29 AM

Build is green

builderr-debug-gcc7.txt
../../../source/ps/Hotkey.cpp: In function 'bool isPressed(const SKey&)':
../../../source/ps/Hotkey.cpp:120:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
builderr-release-gcc7.txt
../../../source/ps/Hotkey.cpp: In function 'bool isPressed(const SKey&)':
../../../source/ps/Hotkey.cpp:120:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

See https://jenkins.wildfiregames.com/job/docker-differential/4548/display/redirect for more details.

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext_dbg.a(tinygettext.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblobby_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libglooxwrapper_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file

See https://jenkins.wildfiregames.com/job/macos-differential/2889/display/redirect for more details.

wraitii requested review of this revision.Jan 16 2021, 1:00 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jan 16 2021, 4:25 PM
This revision was automatically updated to reflect the committed changes.