mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-28 18:46:06 +00:00
Hide cursor on key/button press (#1211)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / pre-release (push) Blocked by required conditions
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / pre-release (push) Blocked by required conditions
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
This commit is contained in:
parent
9f79764b01
commit
ec6579cb4f
|
@ -304,6 +304,9 @@ 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) {
|
||||
|
@ -329,6 +332,9 @@ void WindowSDL::onGamepadEvent(const SDL_Event* event) {
|
|||
if (button != 0) {
|
||||
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…
Reference in a new issue