We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 939

Summary: FB_OpenMouse -> SDL_getenv("TSLIB_TSDEVICE")
Product: SDL Reporter: Terence Tsai <cxh>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: 1.2.14   
Hardware: All   
OS: Linux   

Description Terence Tsai 2010-01-29 20:25:50 UTC
SDL_INPUT_TSLIB = 1
SDL_getenv("TSLIB_TSDEVICE") will be never run.


#if SDL_INPUT_TSLIB
	if ( mousedrv && (SDL_strcmp(mousedrv, "TSLIB") == 0) ) {
                /* SDL_getenv will never run */
		if (mousedev == NULL) mousedev = SDL_getenv("TSLIB_TSDEVICE");
		if (mousedev != NULL) {
			ts_dev = ts_open(mousedev, 1);
			if ((ts_dev != NULL) && (ts_config(ts_dev) >= 0)) {
#ifdef DEBUG_MOUSE
				fprintf(stderr, "Using tslib touchscreen\n");
#endif
				mouse_drv = MOUSE_TSLIB;
				mouse_fd = ts_fd(ts_dev);
				return mouse_fd;
			}
		}
		mouse_drv = MOUSE_NONE;
		return mouse_fd;
	}
#endif /* SDL_INPUT_TSLIB */
Comment 1 Sam Lantinga 2010-07-18 10:31:48 UTC
Why not?  Are you confusing mousedrv and mousedev?
Comment 2 Ryan C. Gordon 2011-08-21 07:26:44 UTC
Resolving bug as INVALID. This appears to be a misunderstanding of what is happening in that piece of code. If this is incorrect, and you feel that this code is in fact buggy, you are welcome to reopen the bug.

Thanks!

--ryan.