Drop dead Win32 retained key state
This commit is contained in:
@@ -70,6 +70,9 @@ What is already real:
|
||||
- `pp_app_core`
|
||||
|
||||
Latest slice:
|
||||
- `src/platform_windows/windows_window_shell.*` no longer carries the dead
|
||||
retained raw key-state array or its accessor; Win32 key synchronization now
|
||||
relies only on the virtual-key map plus `App` key state.
|
||||
- `linux/src/main.cpp` now binds and clears the FPS-title callback directly in
|
||||
the Linux entrypoint-owned shell; `App::set_platform_services()` no longer
|
||||
installs Linux-specific GLFW title behavior.
|
||||
|
||||
@@ -78,6 +78,8 @@ Completed, blocked, and superseded task history moved to
|
||||
the queue is now ordered by code movement instead.
|
||||
|
||||
Current slice:
|
||||
- `src/platform_windows/windows_window_shell.*` no longer keeps the dead
|
||||
retained raw key-state array.
|
||||
- `linux/src/main.cpp` now owns the Linux FPS-title callback lifecycle
|
||||
directly, and `src/app_events.cpp` no longer installs Linux-specific title
|
||||
behavior from `App::set_platform_services()`.
|
||||
|
||||
@@ -14,11 +14,6 @@ void destroy_window();
|
||||
|
||||
namespace pp::platform::windows {
|
||||
|
||||
struct RetainedState final
|
||||
{
|
||||
bool keys[256]{};
|
||||
};
|
||||
|
||||
namespace {
|
||||
|
||||
[[nodiscard]] WacomTablet& active_wacom_tablet()
|
||||
@@ -47,7 +42,7 @@ namespace {
|
||||
|
||||
void synchronize_app_key_state_from_keyboard(App& app)
|
||||
{
|
||||
static BYTE keys[256];
|
||||
BYTE keys[256];
|
||||
if (!GetKeyboardState(keys))
|
||||
return;
|
||||
|
||||
@@ -69,9 +64,7 @@ void synchronize_app_key_state_from_keyboard(App& app)
|
||||
|
||||
void initialize_retained_input_state()
|
||||
{
|
||||
auto& state = retained_state();
|
||||
auto& vkey_map = retained_virtual_key_map();
|
||||
memset(&state.keys, 0, sizeof(state.keys));
|
||||
for (int k = 1; k < 256; ++k) // ignore kKey::Unknown = 0
|
||||
{
|
||||
for (int vk = 0; vk < 256; ++vk)
|
||||
@@ -93,12 +86,6 @@ void initialize_retained_input_state()
|
||||
}
|
||||
}
|
||||
|
||||
RetainedState& retained_state()
|
||||
{
|
||||
static RetainedState state;
|
||||
return state;
|
||||
}
|
||||
|
||||
pp::platform::windows::VrShellState& pp::platform::windows::retained_vr_shell_state() noexcept
|
||||
{
|
||||
static pp::platform::windows::VrShellState state;
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
|
||||
namespace pp::platform::windows {
|
||||
|
||||
struct RetainedState;
|
||||
|
||||
void initialize_retained_input_state();
|
||||
RetainedState& retained_state();
|
||||
pp::platform::windows::VrShellState& retained_vr_shell_state() noexcept;
|
||||
LRESULT CALLBACK main_window_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user