Changeset 8950 in vbox for trunk/src/VBox/Additions/x11/xmouse
- Timestamp:
- May 20, 2008 11:41:40 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/xmouse/VBoxUtils.c
r8155 r8950 29 29 #include "compiler.h" 30 30 31 /* This is an ugly hack, but I can't see anywhere to save this information 32 in the driver context. */ 33 /** Have we ever failed to open the VBox device? */ 34 static Bool gDeviceOpenFailed = FALSE; 35 31 36 int VBoxMouseInit(void) 32 37 { 33 int rc = VbglR3Init(); 38 int rc; 39 if (gDeviceOpenFailed) 40 return 1; 41 rc = VbglR3Init(); 34 42 if (RT_FAILURE(rc)) 35 43 { 36 ErrorF("VbglR3Init failed.\n"); 44 ErrorF("Failed to open the VirtualBox device, falling back to compatibility mouse mode.\n"); 45 gDeviceOpenFailed = TRUE; 37 46 return 1; 38 47 } … … 43 52 ErrorF("Error sending mouse pointer capabilities to VMM! rc = %d (%s)\n", 44 53 errno, strerror(errno)); 54 gDeviceOpenFailed = TRUE; 55 VbglR3Term(); 45 56 return 1; 46 57 } … … 56 67 uint32_t pointerYPos; 57 68 69 if (gDeviceOpenFailed) 70 return 2; 58 71 AssertPtrReturn(puAbsXPos, VERR_INVALID_PARAMETER); 59 72 AssertPtrReturn(puAbsYPos, VERR_INVALID_PARAMETER); … … 72 85 int VBoxMouseFini(void) 73 86 { 87 if (gDeviceOpenFailed) 88 return VINF_SUCCESS; 74 89 int rc = VbglR3SetMouseStatus(0); 75 90 VbglR3Term();
Note:
See TracChangeset
for help on using the changeset viewer.