more handler

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@268 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-11 11:46:28 +00:00
parent 927f9577ca
commit a5dae3ffd9
5 changed files with 33 additions and 12 deletions

View File

@@ -200,7 +200,7 @@ void MwLLNextEvent(MwLL handle) {
p.y = ev.xmotion.y;
MwLLDispatch(handle, move, &p);
} else if(ev.type == KeyPress) {
} else if(ev.type == KeyPress || ev.type == KeyRelease) {
int n = -1;
char str[512];
KeySym sym;
@@ -237,7 +237,13 @@ void MwLLNextEvent(MwLL handle) {
n = MwLLKeyDown;
}
if(n != -1) MwLLDispatch(handle, key, &n);
if(n != -1) {
if(ev.type == KeyPress) {
MwLLDispatch(handle, key, &n);
} else {
MwLLDispatch(handle, key_released, &n);
}
}
}
if(render) {
int x, y;