Changeset - r3324:311d1e4773fd
[Not reviewed]
master
0 1 0
Darkvater - 19 years ago 2006-03-24 17:00:55
darkvater@openttd.org
(svn r4090) - Followup for r4075. Some SDL implementations seem to have a different define for the SDL_ACTIVEEVENT SDL_APPMOUSEFOCUS which caused undrawing of the mouse only on losing input-focus. Correctly check for the event state
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
video/sdl_v.c
Show inline comments
 
@@ -346,9 +346,11 @@ static int PollEvent(void)
 
		break;
 

	
 
	case SDL_ACTIVEEVENT:
 
		if (ev.active.gain == 1) // mouse entered the window, enable cursor
 
		if (!(ev.active.state & SDL_APPMOUSEFOCUS)) break;
 

	
 
		if (ev.active.gain) { // mouse entered the window, enable cursor
 
			_cursor.in_window = true;
 
		else if (ev.active.gain == 0) {
 
		} else {
 
			UndrawMouseCursor(); // mouse left the window, undraw cursor
 
			_cursor.in_window = false;
 
		}
0 comments (0 inline, 0 general)