16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 06:29:18 +02:00

build 180805. minor bug fixes

This commit is contained in:
tmj-fstate
2018-08-05 13:22:21 +02:00
parent 9830e6c15e
commit 47d8944d17
8 changed files with 23 additions and 12 deletions

View File

@@ -87,7 +87,7 @@ keyboard_input::recall_bindings() {
if( bindingkeyname == "shift" ) { binding |= keymodifier::shift; }
else if( bindingkeyname == "ctrl" ) { binding |= keymodifier::control; }
else if( bindingkeyname == "none" ) { binding = -1; }
else if( bindingkeyname == "none" ) { binding = 0; }
else {
// regular key, convert it to glfw key code
auto const keylookup = nametokeymap.find( bindingkeyname );
@@ -143,10 +143,10 @@ keyboard_input::key( int const Key, int const Action ) {
true );
}
if( Key == -1 ) { return false; }
// store key state
if( Key != -1 ) {
input::keys[ Key ] = Action;
}
input::keys[ Key ] = Action;
if( true == is_movement_key( Key ) ) {
// if the received key was one of movement keys, it's been handled and we don't need to bother further
@@ -187,7 +187,7 @@ keyboard_input::bind() {
for( auto const &bindingsetup : m_bindingsetups ) {
m_bindings[ bindingsetup.binding ] = bindingsetup.command;
m_bindings[ bindingsetup.binding ] = bindingsetup.command;
}
// cache movement key bindings
m_bindingscache.forward = binding( user_command::moveforward );