d6e438a541
build / build (push) Successful in 2m13s
Stale GL_UNPACK state in gl4es and a missing pre-release GPU sync caused diagonal-banded corruption in the 3D view. Synthetic key press/release must track the real controller button or touch down/up edges, not fire together in one call - fixes a typed movement key sticking forever, then a follow-up that had silently broken A-button jump and on-screen keyboard arrow keys. Also adds force-rebuild.sh for the known stageEngine stale-cache issue.
37 lines
1.4 KiB
C
37 lines
1.4 KiB
C
// Bridges VR aim-ray hit-testing (xr_input.c) to the vendored engine's
|
|
// mouse input (engine/src/Libraries/INPUT/Source/mouse.h) - lets the
|
|
// controller's laser pointer drive the game's own UI (inventory, menus,
|
|
// dialogs) exactly like a desktop mouse: absolute cursor position plus a
|
|
// single left button, no relative/mouselook mode, no right button.
|
|
#ifndef QUESTSHOCK_XR_MOUSE_H
|
|
#define QUESTSHOCK_XR_MOUSE_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// Sets the engine's absolute mouse position (mouse_put_xy()) - call every
|
|
// frame the aim ray is actually hitting the game quad; x/y are pixel
|
|
// coordinates in the game's own logical resolution (see
|
|
// xr_get_game_resolution() in xr_session.h), already clamped by the
|
|
// caller. Do not call on frames the ray isn't hitting the game quad - the
|
|
// cursor should hold its last position, not snap elsewhere.
|
|
void xr_mouse_move(int x, int y);
|
|
|
|
// Pushes a synthetic SDL_MOUSEBUTTONDOWN/UP (SDL_BUTTON_LEFT) - matches
|
|
// KeyboardOverlay's nativeSendPrintableCharDown()/Up() in
|
|
// questshock_native.c: a plain SDL_Event built by hand and handed to the
|
|
// public SDL_PushEvent(),
|
|
// no engine patch needed. pump_events() (sdl_events.c) reads whatever
|
|
// mouse_put_xy() last set, not any x/y carried on the event itself - call
|
|
// xr_mouse_move() first if position needs updating this frame.
|
|
void xr_mouse_click(bool down);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|