重构键盘输入为 IKeyboardState 接口,消除 App 层对 SDL 的直接依赖

重构键盘输入为 IKeyboardState 接口,消除 App 层对 SDL 的直接依赖

- 新增 IKeyboardState 抽象接口及 SdlKeyboardState/EvdevKeyboardState 实现
- PlayerController 改用 IKeyboardState 替代直接调用 SDL_GetKeyboardState
- 移除 Camera2D.h 中对 Core 私有头文件 Camera.h 的引用
- 将 Timer.h 从 Core/Core 移至 Core/Platform,符合架构边界规范
- 键盘输入优先级调整为高于指针输入
This commit is contained in:
2026-06-10 15:22:30 +08:00
parent fb216de107
commit e00fc1799d
15 changed files with 164 additions and 28 deletions
+2
View File
@@ -21,6 +21,7 @@ set(CORE_SOURCES
src/Core/Platform/AlsaAudioInput.cpp
src/Core/Platform/AlsaAudioOutput.cpp
src/Core/Platform/EvdevButtonInput.cpp
src/Core/Platform/EvdevKeyboardState.cpp
src/Core/Platform/EvdevTouchInput.cpp
src/Core/Rasterizer/Rasterizer.cpp
src/Core/Rasterizer/TriangleRasterizer.cpp
@@ -39,6 +40,7 @@ else()
src/Core/Platform/SdlAudioInput.cpp
src/Core/Platform/SdlAudioOutput.cpp
src/Core/Platform/SdlKeyboardButtonInput.cpp
src/Core/Platform/SdlKeyboardState.cpp
src/Core/Platform/SdlPointerInput.cpp
src/Core/Platform/SdlPhotoSensor.cpp
)