Update window pixel density on pen move
This commit is contained in:
parent
afd15c8509
commit
31bc123906
1 changed files with 1 additions and 0 deletions
|
|
@ -711,6 +711,7 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_EVENT_PEN_MOTION: {
|
case SDL_EVENT_PEN_MOTION: {
|
||||||
|
mS.m->window.scale = SDL_GetWindowPixelDensity(mS.window);
|
||||||
mS.m->input.pen.isEraser = event->pmotion.pen_state & SDL_PEN_INPUT_ERASER_TIP;
|
mS.m->input.pen.isEraser = event->pmotion.pen_state & SDL_PEN_INPUT_ERASER_TIP;
|
||||||
mS.m->input.mouse.set_pos({event->pmotion.x * mS.m->window.scale, event->pmotion.y * mS.m->window.scale});
|
mS.m->input.mouse.set_pos({event->pmotion.x * mS.m->window.scale, event->pmotion.y * mS.m->window.scale});
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue