Skip to content

Commit

Permalink
Apply refactoring suggested by @FreeZoneMods
Browse files Browse the repository at this point in the history
  • Loading branch information
Zegeri committed Nov 8, 2018
1 parent adc9937 commit 154c836
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/xrGame/xr_level_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ void initialize_bindings()

void remap_keys()
{
int idx = 0;
string128 buff;
// Log("Keys remap:");
while (keyboards[idx].key_name)
for (int idx = 0; keyboards[idx].key_name; ++idx)
{
buff[0] = 0;
_keyboard& kb = keyboards[idx];
const bool res = pInput->get_dik_name(kb.dik, buff, sizeof(buff));
if (res)
if (pInput->get_dik_name(kb.dik, buff, sizeof(buff)))
kb.key_local_name = buff;
else
{
Expand All @@ -55,7 +53,6 @@ void remap_keys()
}

// Msg("[%s]-[%s]", kb.key_name, kb.key_local_name.c_str());
++idx;
}
}

Expand Down

0 comments on commit 154c836

Please sign in to comment.