Files
palladium/pd/drivers/source/hid.cpp
tobid7 57634cbf4b # Rewrite 5
- Move Libraries Source into pd directory and give them all their own CMakeLists.txt
- Partial rewrite core (color, autogenerated vec), lithium (now uses UNIQUE PTR for Commands), UI7
- Use MenuV2 as new standart in UI7
- Implementz ViewPort Pre alpha to UI7
- Add Line Drawing to DrawList (not Working)
- Implement a Complete new drievrs API (static Drivers)
- NO SUPPORT FOR SHARED LIBRARY BUILDS IN VERSION 5 YET
- Add Tools to Autogenerate Headers and Stuff
2025-06-22 21:05:09 +02:00

20 lines
643 B
C++
Executable File

#include <pd/drivers/hid.hpp>
#include <pd/drivers/pd_p_api.hpp>
namespace PD {
PD_DEF_EXP(HidDriver::Ref, Hid::pHid);
bool HidDriver::IsEvent(Event e, Key keys) { return KeyEvents[0][e] & keys; }
void HidDriver::SwapTab() {
auto tkd = KeyEvents[1][Event_Down];
auto tkh = KeyEvents[1][Event_Held];
auto tku = KeyEvents[1][Event_Up];
KeyEvents[1][Event_Down] = KeyEvents[0][Event_Down];
KeyEvents[1][Event_Held] = KeyEvents[0][Event_Held];
KeyEvents[1][Event_Up] = KeyEvents[0][Event_Up];
KeyEvents[0][Event_Down] = tkd;
KeyEvents[0][Event_Held] = tkh;
KeyEvents[0][Event_Up] = tku;
}
} // namespace PD