NoGUI: Linux compile fix

This commit is contained in:
Connor McLaughlin 2021-02-28 04:10:48 +10:00
parent 97cf3f770e
commit 1c1abee61a
3 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
#pragma once
#include "../types.h"
#include "vulkan_loader.h"
#include <functional>
#include <algorithm>
#include <memory>
namespace Vulkan {

View file

@ -258,13 +258,13 @@ static const std::map<int, const char*> s_evdev_key_names = {{KEY_ESC, "Escape"}
{KEY_RFKILL, "Rfkill"},
{KEY_MICMUTE, "Micmute"}};
const char* GetKeyName(int key)
static const char* GetKeyName(int key)
{
const auto it = s_evdev_key_names.find(key);
return it == s_evdev_key_names.end() ? nullptr : it->second;
}
std::optional<int> GetKeyCodeForName(const std::string_view key_name)
static std::optional<int> GetKeyCodeForName(const std::string_view key_name)
{
for (const auto& it : s_evdev_key_names)
{

View file

@ -164,7 +164,7 @@ void VTYHostInterface::PollEvDevKeyboards()
if (static_cast<unsigned>(code) < countof(ImGuiIO::KeysDown))
ImGui::GetIO().KeysDown[code] = pressed;
HandleHostKeyEvent(code, pressed);
HandleHostKeyEvent(code, 0, pressed);
}
}
}