summaryrefslogtreecommitdiff
path: root/games/wesnoth/patches/patch-ah
blob: e9c1c061011aa073b3080719393f349053f912eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ah,v 1.2 2011/02/24 13:36:57 adam Exp $

Fix C++ error.

--- src/controller_base.cpp.orig	2011-02-24 12:28:03.000000000 +0000
+++ src/controller_base.cpp
@@ -54,6 +54,7 @@ void controller_base::handle_event(const
 	if(gui::in_dialog()) {
 		return;
 	}
+	SDL_Event new_event;
 
 	switch(event.type) {
 	case SDL_KEYDOWN:
@@ -71,7 +72,6 @@ void controller_base::handle_event(const
 		break;
 	case SDL_MOUSEMOTION:
 		// Ignore old mouse motion events in the event queue
-		SDL_Event new_event;
 		if(SDL_PeepEvents(&new_event,1,SDL_GETEVENT,
 					SDL_EVENTMASK(SDL_MOUSEMOTION)) > 0) {
 			while(SDL_PeepEvents(&new_event,1,SDL_GETEVENT,