aboutsummaryrefslogtreecommitdiff
path: root/build/android/irrlicht-back_button.patch
blob: 227749ba7587f83f655f1f4290e98c2aa42b5829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp	2014-06-03 20:56:21.289559503 +0200
+++ irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp.orig	2014-06-03 20:57:39.281556749 +0200
@@ -423,6 +423,7 @@
 			}
 			
 			device->postEventFromUser(event);
+			status = 1;
 		}
 		break;
 		default:
@@ -479,7 +480,7 @@
     KeyMap[1] = KEY_LBUTTON; // AKEYCODE_SOFT_LEFT
     KeyMap[2] = KEY_RBUTTON; // AKEYCODE_SOFT_RIGHT
     KeyMap[3] = KEY_HOME; // AKEYCODE_HOME
-    KeyMap[4] = KEY_BACK; // AKEYCODE_BACK
+    KeyMap[4] = KEY_CANCEL; // AKEYCODE_BACK
     KeyMap[5] = KEY_UNKNOWN; // AKEYCODE_CALL
     KeyMap[6] = KEY_UNKNOWN; // AKEYCODE_ENDCALL
     KeyMap[7] = KEY_KEY_0; // AKEYCODE_0
href='#n58'>58 59 60 61
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#pragma once

#include "irr_v3d.h"
#include "lua_api/l_base.h"

class ServerMap;

class NodeTimerRef : public ModApiBase
{
private:
	v3s16 m_p;
	ServerMap *m_map;

	static const char className[];
	static const luaL_Reg methods[];

	static int gc_object(lua_State *L);

	static NodeTimerRef *checkobject(lua_State *L, int narg);

	static int l_set(lua_State *L);

	static int l_start(lua_State *L);

	static int l_stop(lua_State *L);

	static int l_is_started(lua_State *L);

	static int l_get_timeout(lua_State *L);

	static int l_get_elapsed(lua_State *L);

public:
	NodeTimerRef(v3s16 p, ServerMap *map) : m_p(p), m_map(map) {}
	~NodeTimerRef() = default;

	// Creates an NodeTimerRef and leaves it on top of stack
	// Not callable from Lua; all references are created on the C side.
	static void create(lua_State *L, v3s16 p, ServerMap *map);

	static void Register(lua_State *L);