--- a/hedgewars/uTouch.pas Tue Nov 10 18:16:35 2015 +0100
+++ b/hedgewars/uTouch.pas Tue Nov 10 20:43:13 2015 +0100
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*)
{$INCLUDE "options.inc"}
@@ -63,6 +63,7 @@
const
clickTime = 200;
+ nilFingerId = High(TSDL_FingerId);
baseRectSize = 96;
var
@@ -295,7 +296,7 @@
end;
if targetting then
- AddCaption('Press the target button to mark the target', cWhiteColor, capgrpAmmoInfo);
+ AddCaption(trmsg[sidPressTarget], cWhiteColor, capgrpAmmoInfo);
deleteFinger(pointerId);
end;
@@ -360,8 +361,9 @@
//Check array sizes
if length(fingers) < pointerCount then
begin
- setLength(fingers, pointerCount * 2);
- WriteLnToConsole('allocated ' + inttostr(length(fingers)) + ' finger elements');
+ setLength(fingers, length(fingers)*2);
+ for index := length(fingers) div 2 to length(fingers) do
+ fingers[index].id := nilFingerId;
end;
xCursor := convertToCursorX(x);