Files
AnyPS5/core/libs/prx/libSceMouse/include/MouseState.hpp
T
Mouad-Scriptz-0andClaude Fable 5.1 94087d08b0 feat(libSceVideoOut): capture the host cursor for guest mice and scale their deltas
The console's mouse reports relative motion, so the host cursor can never line
up with the cursor a title draws. While a title has a mouse open and the
window is focused the host cursor is hidden and captured, released on focus
loss or while the pad's mouse-to-stick toggle is on. Motion deltas are scaled
from the presented image's size in window units to the title's display
resolution with sub-pixel carry, so the title's cursor travels as far as the
host pointer would, on scaled desktops and letterboxed windows alike.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 14:05:52 +00:00

31 lines
846 B
C++

#ifndef CORE_LIBS_PRX_LIBSCEMOUSE_MOUSESTATE_HPP
#define CORE_LIBS_PRX_LIBSCEMOUSE_MOUSESTATE_HPP
#include "prx/libSceMouse/include/mouse_structs.h"
struct MouseInputEvent {
std::int32_t x = 0;
std::int32_t y = 0;
std::int32_t wheel = 0;
std::int32_t tilt = 0;
std::uint32_t button = 0;
bool pressed = false;
bool resetButtons = false;
bool connectionChange = false;
bool connected = true;
};
namespace Mouse {
bool IsOpen();
int Initialize();
int Open(int userId, std::int32_t type, std::int32_t index, const MouseOpenParam* param);
int Close(std::int32_t handle);
int Read(std::int32_t handle, MouseData* data, std::int32_t num);
void Publish(const MouseInputEvent& event);
}
extern "C" void MousePublishInput_nid_postfix(const MouseInputEvent& event);
extern "C" bool MouseIsOpen_nid_postfix();
#endif