mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-18 22:35:39 +00:00
HostDisplay: Use surface scale for drawing software cursor
This commit is contained in:
parent
bf08385051
commit
f65a50d84b
|
@ -129,10 +129,9 @@ std::tuple<s32, s32, s32, s32> HostDisplay::CalculateDrawRect(s32 window_width,
|
|||
|
||||
std::tuple<s32, s32, s32, s32> HostDisplay::CalculateSoftwareCursorDrawRect() const
|
||||
{
|
||||
const u32 cursor_extents_x =
|
||||
static_cast<u32>(static_cast<float>(m_cursor_texture->GetWidth()) * m_cursor_texture_scale * 0.5f);
|
||||
const u32 cursor_extents_y =
|
||||
static_cast<u32>(static_cast<float>(m_cursor_texture->GetHeight()) * m_cursor_texture_scale * 0.5f);
|
||||
const float scale = m_window_info.surface_scale * m_cursor_texture_scale;
|
||||
const u32 cursor_extents_x = static_cast<u32>(static_cast<float>(m_cursor_texture->GetWidth()) * scale * 0.5f);
|
||||
const u32 cursor_extents_y = static_cast<u32>(static_cast<float>(m_cursor_texture->GetHeight()) * scale * 0.5f);
|
||||
|
||||
const s32 out_left = m_mouse_position_x - cursor_extents_x;
|
||||
const s32 out_top = m_mouse_position_y - cursor_extents_y;
|
||||
|
|
Loading…
Reference in a new issue