fix key press on windows activated
This commit is contained in:
15
src/main.cpp
15
src/main.cpp
@@ -828,6 +828,21 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
|||||||
tasklist.emplace_back([=] {
|
tasklist.emplace_back([=] {
|
||||||
int active = GET_WM_ACTIVATE_STATE(wp, lp);
|
int active = GET_WM_ACTIVATE_STATE(wp, lp);
|
||||||
WacomTablet::I.set_focus(active);
|
WacomTablet::I.set_focus(active);
|
||||||
|
for (int k = 0; k < 256; k++)
|
||||||
|
{
|
||||||
|
if (App::I.keys[k])
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 256; i++)
|
||||||
|
{
|
||||||
|
if ((int)convert_key(i) == k)
|
||||||
|
{
|
||||||
|
bool down = GetKeyState(i) & 0x8000;
|
||||||
|
if (!down)
|
||||||
|
App::I.key_up((kKey)k);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user