2
* mousedrv.m - MacVICE mouse driver
5
* Christian Vogelgsang <chris@vogelgsang.org>
7
* This file is part of VICE, the Versatile Commodore Emulator.
8
* See README for copyright notice.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
28
#include "vicemachine.h"
31
extern int _mouse_enabled;
32
static int ptr_x=0,ptr_y=0;
33
static int hw_x=0,hw_y=0;
35
int mousedrv_resources_init(void)
40
int mousedrv_cmdline_options_init(void)
45
void mousedrv_init(void)
49
void mousedrv_mouse_changed(void)
51
[[theVICEMachine machineNotifier] postToggleMouseNotification:_mouse_enabled];
56
BYTE mousedrv_get_x(void)
58
int dx = ptr_x - hw_x;
61
else if(dx > MAX_DELTA)
64
return (BYTE)((hw_x&0x3f) << 1);
67
BYTE mousedrv_get_y(void)
69
int dy = ptr_y - hw_y;
72
else if(dy > MAX_DELTA)
75
return (BYTE)((hw_y&0x3f) << 1);
78
void mouse_move(int x, int y)