try to be more strict/paranoid with cvars.

load q2 game dlls from the binarydir in preference to gamedir (allows such dlls to be distributed with the engine).
add small emscripten msvc project so I can build the web port a little more conveniently.
require mouse releases to have had a corresponding mouse press while in the menu. this solves issues with mouse clicks triggering the load menu while dead and instantlyish loading one, and alt-tab issues too.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4755 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-09-20 04:11:39 +00:00
parent 489e88feb4
commit b29c68ef92
21 changed files with 376 additions and 88 deletions

View file

@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "shader.h"
m_state_t m_state;
qboolean menu_mousedown;
void M_DrawScalePic (int x, int y, int w, int h, mpic_t *pic)
{
@ -1275,6 +1276,7 @@ void M_Draw (int uimenu)
if (m_state != m_complex)
{
M_RemoveAllMenus();
menu_mousedown = false;
}
#endif
@ -1352,7 +1354,9 @@ void M_Keydown (int key, int unicode)
return;
case m_complex:
if (key != K_MOUSE1) //mouse clicks are deferred until the release event. this is for touch screens and aiming.
if (key == K_MOUSE1) //mouse clicks are deferred until the release event. this is for touch screens and aiming.
menu_mousedown = true;
else
M_Complex_Key (key, unicode);
return;
#endif
@ -1383,8 +1387,9 @@ void M_Keyup (int key, int unicode)
{
#ifndef NOBUILTINMENUS
case m_complex:
if (key == K_MOUSE1)
if (key == K_MOUSE1 && menu_mousedown)
M_Complex_Key (key, unicode);
menu_mousedown = false;
return;
#endif
#ifdef PLUGINS