mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-12 20:55:56 +00:00
imgui/renderer: Hide Cursor on Idle Implementation (#1266)
Implement hide cursor on idle w/ idle timeout duration (configurable via GUI). While at it add always and never to hide the cursor options as well. * Revert commit #1211 as to not interfere with the cursor states. * Make hide cursor on idle as the default setting w/ timeout duration of 5 seconds to hide. * Add an input tab in the settings page to add the hide cursor setting, with hiding the idle timeout box with respect to the cursor hide option. Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
parent
96344873d6
commit
f139762c64
7 changed files with 296 additions and 12 deletions
|
@ -313,9 +313,6 @@ void WindowSDL::onKeyPress(const SDL_Event* event) {
|
|||
if (axis != Input::Axis::AxisMax) {
|
||||
controller->Axis(0, axis, ax);
|
||||
}
|
||||
if (SDL_GetCursor() != NULL) {
|
||||
SDL_HideCursor();
|
||||
}
|
||||
}
|
||||
|
||||
void WindowSDL::onGamepadEvent(const SDL_Event* event) {
|
||||
|
@ -354,9 +351,6 @@ void WindowSDL::onGamepadEvent(const SDL_Event* event) {
|
|||
controller->CheckButton(0, button, event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN);
|
||||
}
|
||||
}
|
||||
if (SDL_GetCursor() != NULL) {
|
||||
SDL_HideCursor();
|
||||
}
|
||||
break;
|
||||
case SDL_EVENT_GAMEPAD_AXIS_MOTION:
|
||||
axis = event->gaxis.axis == SDL_GAMEPAD_AXIS_LEFTX ? Input::Axis::LeftX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue