Add HidDriver base and small HidGLFW driver

This commit is contained in:
2026-04-03 14:12:42 +02:00
parent 8215baac99
commit 5bc8046ebe
12 changed files with 448 additions and 124 deletions
+3
View File
@@ -88,9 +88,12 @@ int main(int argc, char** argv) {
pList.SetFont(&font);
App app(font);
while (pOs->Mainloop()) {
PD::Hid::Update();
pOs->ClearViewPort();
PD::Li::ResetPools(); // Move to other place (or refactor this)
app.Update(pOs->GetViewport(), pList);
pList.DrawText(5, std::format("Mouse: {}", PD::Hid::MousePos()).c_str(),
PD::Color("#ffffffff"));
PD::Gfx::Reset();
PD::Gfx::Draw(pList);
pList.Clear();
+1
View File
@@ -72,6 +72,7 @@ void DesktopOS::Init() {
}
#endif
glfwSwapInterval(1);
PD::Hid::UseDriver<HidGlfw>(impl->win);
}
void DesktopOS::Deinit() {
+1
View File
@@ -42,6 +42,7 @@ void HorizonCtr::Init() {
C3D_RenderTargetSetOutput(impl->Bottom, GFX_BOTTOM, GFX_LEFT,
DisplayTransferFlags);
PD::Gfx::UseDriver<PD::GfxCitro3D>();
PD::Hid::UseDriver<PD::HidDriver>();
}
void HorizonCtr::Deinit() {
+1
View File
@@ -29,6 +29,7 @@ void HorizonNX::Init() {
gladLoadGL();
glfwSwapInterval(1);
PD::Gfx::UseDriver<PD::GfxOpenGL3>();
PD::Hid::UseDriver<PD::HidDriver>();
}
void HorizonNX::Deinit() {