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 - FB_OpenMouse -> SDL_getenv("TSLIB_TSDEVICE")
Summary: FB_OpenMouse -> SDL_getenv("TSLIB_TSDEVICE")
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 1.2.14
Hardware: All Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-29 20:25 UTC by Terence Tsai
Modified: 2011-08-21 07:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.