Qt: Implement relative mouse mode
This commit is contained in:
@ -917,20 +917,28 @@ void HostInterface::UpdateSoftwareCursor()
|
||||
{
|
||||
if (System::IsShutdown())
|
||||
{
|
||||
SetMouseMode(false, false);
|
||||
m_display->ClearSoftwareCursor();
|
||||
return;
|
||||
}
|
||||
|
||||
const Common::RGBA8Image* image = nullptr;
|
||||
float image_scale = 1.0f;
|
||||
bool relative_mode = false;
|
||||
bool hide_cursor = false;
|
||||
|
||||
for (u32 i = 0; i < NUM_CONTROLLER_AND_CARD_PORTS; i++)
|
||||
{
|
||||
Controller* controller = System::GetController(i);
|
||||
if (controller && controller->GetSoftwareCursor(&image, &image_scale))
|
||||
if (controller && controller->GetSoftwareCursor(&image, &image_scale, &relative_mode))
|
||||
{
|
||||
hide_cursor = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SetMouseMode(relative_mode, hide_cursor);
|
||||
|
||||
if (image && image->IsValid())
|
||||
{
|
||||
m_display->SetSoftwareCursor(image->GetPixels(), image->GetWidth(), image->GetHeight(), image->GetByteStride(),
|
||||
@ -967,6 +975,8 @@ void HostInterface::RecreateSystem()
|
||||
System::ResetPerformanceCounters();
|
||||
}
|
||||
|
||||
void HostInterface::SetMouseMode(bool relative, bool hide_cursor) {}
|
||||
|
||||
void HostInterface::DisplayLoadingScreen(const char* message, int progress_min /*= -1*/, int progress_max /*= -1*/,
|
||||
int progress_value /*= -1*/)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user