Files
AnyPS5/core/libs/prx/libSceMouse/Export.cpp
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

36 lines
850 B
C++

#include "prx/libSceMouse/include/MouseState.hpp"
#include "prx/libc/include/General.hpp"
extern "C" {
int APS5_VABI sceMouseInit() {
return Mouse::Initialize();
}
int APS5_VABI sceMouseOpen(int userId, std::int32_t type, std::int32_t index, const void* param) {
return Mouse::Open(userId, type, index, static_cast<const MouseOpenParam*>(param));
}
int APS5_VABI sceMouseClose(std::int32_t handle) {
return Mouse::Close(handle);
}
int APS5_VABI sceMouseRead(std::int32_t handle, MouseData* data, std::int32_t num) {
return Mouse::Read(handle, data, num);
}
void MousePublishInput_nid_postfix(const MouseInputEvent& event) {
Mouse::Publish(event);
}
int APS5_VABI sceMouseResetAbsolutePosition() {
NotImplemented_nid_no_patch(__func__);
return 0;
}
bool MouseIsOpen_nid_postfix() {
return Mouse::IsOpen();
}
}