NoGUI: Rename DRMHostInterface to VTYHostInterface

This commit is contained in:
Connor McLaughlin
2021-02-14 01:19:44 +10:00
parent d4143399eb
commit f5d7fec914
6 changed files with 37 additions and 37 deletions

View File

@ -0,0 +1,47 @@
#pragma once
#include "nogui_host_interface.h"
#include <memory>
#include <vector>
#include <libevdev/libevdev.h>
class VTYHostInterface final : public NoGUIHostInterface
{
public:
VTYHostInterface();
~VTYHostInterface();
bool Initialize();
void Shutdown();
bool IsFullscreen() const override;
bool SetFullscreen(bool enabled) override;
static std::unique_ptr<NoGUIHostInterface> Create();
protected:
virtual void FixIncompatibleSettings(bool display_osd_messages) override;
bool CreatePlatformWindow(bool fullscreen) override;
void DestroyPlatformWindow() override;
std::optional<WindowInfo> GetPlatformWindowInfo() override;
std::optional<HostKeyCode> GetHostKeyCode(const std::string_view key_code) const override;
void PollAndUpdate() override;
private:
static void SIGTERMHandler(int sig);
void OpenEVDevFDs();
void CloseEVDevFDs();
void PollEvDevKeyboards();
void SetImGuiKeyMap();
struct EvDevKeyboard
{
struct libevdev* obj;
int fd;
};
std::vector<EvDevKeyboard> m_evdev_keyboards;
};