From 67df04e0a2baab57c5fdc1ce2296b54635bbbced Mon Sep 17 00:00:00 2001 From: loki Date: Thu, 6 May 2021 16:51:59 +0200 Subject: [PATCH] Fix cursor position on lower resolution screens --- sunshine/platform/windows/display_vram.cpp | 6 ++---- sunshine/video.cpp | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/sunshine/platform/windows/display_vram.cpp b/sunshine/platform/windows/display_vram.cpp index 8dd5c7f7..6dd7852f 100644 --- a/sunshine/platform/windows/display_vram.cpp +++ b/sunshine/platform/windows/display_vram.cpp @@ -248,8 +248,8 @@ public: return; } - auto x = ((float)rel_x) * cursor_scale; - auto y = ((float)rel_y) * cursor_scale; + auto x = ((float)rel_x); + auto y = ((float)rel_y); cursor_view.TopLeftX = x; cursor_view.TopLeftY = y; @@ -384,7 +384,6 @@ public: this->device_ctx_p = device_ctx_p; - cursor_scale = (float)out_width / (float)in_width; cursor_visible = false; cursor_view.MinDepth = 0.0f; cursor_view.MaxDepth = 1.0f; @@ -644,7 +643,6 @@ public: ps_t scene_ps; D3D11_VIEWPORT cursor_view; - float cursor_scale; bool cursor_visible; float out_width, out_height; diff --git a/sunshine/video.cpp b/sunshine/video.cpp index e0a11dc6..ad298922 100644 --- a/sunshine/video.cpp +++ b/sunshine/video.cpp @@ -373,11 +373,9 @@ static encoder_t software { static std::vector encoders { #ifdef _WIN32 nvenc, -#endif - software, -#ifdef _WIN32 amdvce, #endif + software }; void reset_display(std::shared_ptr &disp, AVHWDeviceType type) {