Fix cursor position on lower resolution screens

This commit is contained in:
loki
2021-05-06 16:51:59 +02:00
parent 7b45f0d899
commit 67df04e0a2
2 changed files with 3 additions and 7 deletions
+2 -4
View File
@@ -248,8 +248,8 @@ public:
return; return;
} }
auto x = ((float)rel_x) * cursor_scale; auto x = ((float)rel_x);
auto y = ((float)rel_y) * cursor_scale; auto y = ((float)rel_y);
cursor_view.TopLeftX = x; cursor_view.TopLeftX = x;
cursor_view.TopLeftY = y; cursor_view.TopLeftY = y;
@@ -384,7 +384,6 @@ public:
this->device_ctx_p = device_ctx_p; this->device_ctx_p = device_ctx_p;
cursor_scale = (float)out_width / (float)in_width;
cursor_visible = false; cursor_visible = false;
cursor_view.MinDepth = 0.0f; cursor_view.MinDepth = 0.0f;
cursor_view.MaxDepth = 1.0f; cursor_view.MaxDepth = 1.0f;
@@ -644,7 +643,6 @@ public:
ps_t scene_ps; ps_t scene_ps;
D3D11_VIEWPORT cursor_view; D3D11_VIEWPORT cursor_view;
float cursor_scale;
bool cursor_visible; bool cursor_visible;
float out_width, out_height; float out_width, out_height;
+1 -3
View File
@@ -373,11 +373,9 @@ static encoder_t software {
static std::vector<encoder_t> encoders { static std::vector<encoder_t> encoders {
#ifdef _WIN32 #ifdef _WIN32
nvenc, nvenc,
#endif
software,
#ifdef _WIN32
amdvce, amdvce,
#endif #endif
software
}; };
void reset_display(std::shared_ptr<platf::display_t> &disp, AVHWDeviceType type) { void reset_display(std::shared_ptr<platf::display_t> &disp, AVHWDeviceType type) {