[fix] fix cursor position error

This commit is contained in:
dijunkun
2024-08-16 14:52:44 +08:00
parent e3c730fd5f
commit c8602b0d89

View File

@@ -21,7 +21,7 @@ int Render::ProcessMouseKeyEven(SDL_Event &ev) {
RemoteAction remote_action; RemoteAction remote_action;
remote_action.m.x = (size_t)(ev.button.x * ratio); remote_action.m.x = (size_t)(ev.button.x * ratio);
remote_action.m.y = (size_t)(ev.button.y * ratio); remote_action.m.y = (size_t)((ev.button.y - title_bar_height_) * ratio);
if (SDL_KEYDOWN == ev.type) // SDL_KEYUP if (SDL_KEYDOWN == ev.type) // SDL_KEYUP
{ {