Camera struct was supposed to be exported to plugins, oops

This commit is contained in:
UnknownShadow200 2020-04-23 17:54:41 +10:00
parent d703f632cd
commit ca231d854c
2 changed files with 7 additions and 1 deletions

View File

@ -9,7 +9,7 @@ struct RayTracer;
struct Camera;
/* Shared data for cameras. */
extern struct _CameraData {
CC_VAR extern struct _CameraData {
/* How sensitive camera is to movements of mouse. */
int Sensitivity;
/* Whether smooth/cinematic camera mode is used. */

View File

@ -1837,12 +1837,18 @@ static void InitRawMouse(void) {
return;
}
/* Only XInput 2.0 is actually required. However, 2.0 has the annoying */
/* behaviour where raw input is NOT delivered while pointer is grabbed. */
/* (i.e. if you press mouse button, no more raw mouse movement events) */
/* http://wine.1045685.n8.nabble.com/PATCH-0-9-Implement-DInput8-mouse-using-RawInput-and-XInput2-RawEvents-only-td6016923.html */
/* Thankfully XInput >= 2.1 corrects this behaviour */
major = 2; minor = 2;
if (XIQueryVersion(win_display, &major, &minor) != Success) {
Platform_Log2("Only XInput %i.%i supported", &major, &minor);
return;
}
// todo multiply detla by 2
XISetMask(masks, XI_RawMotion);
evmask.deviceid = XIAllMasterDevices;
evmask.mask_len = sizeof(masks);