HostDisplay: Track mouse position

This commit is contained in:
Connor McLaughlin
2020-04-26 17:36:49 +10:00
parent 2502afc3f6
commit 1000cb30a9
6 changed files with 44 additions and 7 deletions

View File

@ -15,8 +15,8 @@
#include "frontend-common/sdl_controller_interface.h"
#include "imgui_impl_sdl.h"
#include "opengl_host_display.h"
#include "sdl_key_names.h"
#include "scmversion/scmversion.h"
#include "sdl_key_names.h"
#include <cinttypes>
#include <cmath>
#include <imgui.h>
@ -481,6 +481,12 @@ void SDLHostInterface::HandleSDLEvent(const SDL_Event* event)
}
break;
case SDL_MOUSEMOTION:
{
m_display->SetMousePosition(event->motion.x, event->motion.y);
}
break;
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
{