VNC and Win32 mouse clean-ups.
This commit is contained in:
@@ -156,7 +156,7 @@ mouse_clear_coords(void)
|
|||||||
mouse_z = 0;
|
mouse_z = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
mouse_clear_buttons(void)
|
mouse_clear_buttons(void)
|
||||||
{
|
{
|
||||||
mouse_buttons = 0x00;
|
mouse_buttons = 0x00;
|
||||||
|
@@ -78,6 +78,7 @@ extern const device_t mouse_wacom_artpad_device;
|
|||||||
extern void mouse_clear_x(void);
|
extern void mouse_clear_x(void);
|
||||||
extern void mouse_clear_y(void);
|
extern void mouse_clear_y(void);
|
||||||
extern void mouse_clear_coords(void);
|
extern void mouse_clear_coords(void);
|
||||||
|
extern void mouse_clear_buttons(void);
|
||||||
extern void mouse_subtract_x(int *delta_x, int *o_x, int min, int max, int abs);
|
extern void mouse_subtract_x(int *delta_x, int *o_x, int min, int max, int abs);
|
||||||
extern void mouse_subtract_y(int *delta_y, int *o_y, int min, int max, int invert, int abs);
|
extern void mouse_subtract_y(int *delta_y, int *o_y, int min, int max, int invert, int abs);
|
||||||
extern void mouse_subtract_coords(int *delta_x, int *delta_y, int *o_x, int *o_y,
|
extern void mouse_subtract_coords(int *delta_x, int *delta_y, int *o_x, int *o_y,
|
||||||
|
10
src/vnc.c
10
src/vnc.c
@@ -46,15 +46,6 @@ static int ptr_x;
|
|||||||
static int ptr_y;
|
static int ptr_y;
|
||||||
static int ptr_but;
|
static int ptr_but;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int buttons;
|
|
||||||
int dx;
|
|
||||||
int dy;
|
|
||||||
int dwheel;
|
|
||||||
} MOUSESTATE;
|
|
||||||
|
|
||||||
static MOUSESTATE ms;
|
|
||||||
|
|
||||||
#ifdef ENABLE_VNC_LOG
|
#ifdef ENABLE_VNC_LOG
|
||||||
int vnc_do_log = ENABLE_VNC_LOG;
|
int vnc_do_log = ENABLE_VNC_LOG;
|
||||||
|
|
||||||
@@ -153,7 +144,6 @@ vnc_newclient(rfbClientPtr cl)
|
|||||||
ptr_y = allowedY / 2;
|
ptr_y = allowedY / 2;
|
||||||
mouse_clear_coords();
|
mouse_clear_coords();
|
||||||
mouse_clear_buttons();
|
mouse_clear_buttons();
|
||||||
memset(&ms, 0, sizeof(MOUSESTATE));
|
|
||||||
|
|
||||||
/* We now have clients, un-pause the emulator if needed. */
|
/* We now have clients, un-pause the emulator if needed. */
|
||||||
vnc_log("VNC: unpausing..\n");
|
vnc_log("VNC: unpausing..\n");
|
||||||
|
@@ -32,15 +32,6 @@
|
|||||||
|
|
||||||
int mouse_capture;
|
int mouse_capture;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int buttons;
|
|
||||||
int dx;
|
|
||||||
int dy;
|
|
||||||
int dwheel;
|
|
||||||
} MOUSESTATE;
|
|
||||||
|
|
||||||
MOUSESTATE mousestate;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
win_mouse_init(void)
|
win_mouse_init(void)
|
||||||
{
|
{
|
||||||
@@ -56,8 +47,6 @@ win_mouse_init(void)
|
|||||||
ridev.usUsage = 0x02;
|
ridev.usUsage = 0x02;
|
||||||
if (!RegisterRawInputDevices(&ridev, 1, sizeof(ridev)))
|
if (!RegisterRawInputDevices(&ridev, 1, sizeof(ridev)))
|
||||||
fatal("plat_mouse_init: RegisterRawInputDevices failed\n");
|
fatal("plat_mouse_init: RegisterRawInputDevices failed\n");
|
||||||
|
|
||||||
memset(&mousestate, 0, sizeof(MOUSESTATE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user