diff options
author | Jaroslav Hensl <emulator@emulace.cz> | 2024-06-13 10:20:58 +0200 |
---|---|---|
committer | Jaroslav Hensl <emulator@emulace.cz> | 2024-06-13 10:20:58 +0200 |
commit | 4b02bef1a7b00ca8a392b7fa7ef36d6ad8fd4e88 (patch) | |
tree | cc0eab7b3d6d49e5faa8d7860c34476137c6d2f7 /vxd_mouse.c | |
parent | 1280980dd1b1ed8c87c29ea3f95c4c58f844c295 (diff) | |
download | vmdisp9x-4b02bef1a7b00ca8a392b7fa7ef36d6ad8fd4e88.tar.gz |
accelerated mouse on screen target
Diffstat (limited to 'vxd_mouse.c')
-rw-r--r-- | vxd_mouse.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/vxd_mouse.c b/vxd_mouse.c index 1c6eb76..ea4de37 100644 --- a/vxd_mouse.c +++ b/vxd_mouse.c @@ -31,6 +31,10 @@ THE SOFTWARE. #include "cursor.h"
+#ifdef SVGA
+#include "vxd_svga.h"
+#endif
+
#include "code32.h"
extern FBHDA_t *hda;
@@ -96,6 +100,16 @@ BOOL mouse_load() DWORD cbw;
if(!mouse_buffer_mem) return FALSE;
+
+#ifdef SVGA
+ if(SVGA_mouse_hw())
+ {
+ BOOL r = SVGA_mouse_load();
+ mouse_valid = FALSE;
+ mouse_notify_accel();
+ return r;
+ }
+#endif
cur = (CURSORSHAPE*)mouse_buffer_mem;
@@ -188,6 +202,14 @@ BOOL mouse_load() void mouse_move(int x, int y)
{
+#ifdef SVGA
+ if(SVGA_mouse_hw())
+ {
+ SVGA_mouse_move(x, y);
+ return;
+ }
+#endif
+
if(mouse_valid && mouse_visible && !mouse_empty)
{
FBHDA_access_begin(0);
@@ -204,6 +226,14 @@ void mouse_move(int x, int y) void mouse_show()
{
+#ifdef SVGA
+ if(SVGA_mouse_hw())
+ {
+ SVGA_mouse_show();
+ return;
+ }
+#endif
+
mouse_visible = TRUE;
mouse_notify_accel();
@@ -211,6 +241,14 @@ void mouse_show() void mouse_hide()
{
+#ifdef SVGA
+ if(SVGA_mouse_hw())
+ {
+ SVGA_mouse_hide();
+ return;
+ }
+#endif
+
FBHDA_access_begin(0);
mouse_visible = FALSE;
FBHDA_access_end(0);
@@ -220,6 +258,14 @@ void mouse_hide() void mouse_invalidate()
{
+#ifdef SVGA
+ if(SVGA_mouse_hw())
+ {
+ SVGA_mouse_hide();
+ return;
+ }
+#endif
+
mouse_valid = FALSE;
mouse_notify_accel();
|