Unload hotkeys on shutdown.
Fixes double registration of hotkeys on engine restart. This was SVN commit r15755.
This commit is contained in:
parent
28c0b00b2e
commit
66a2fe6308
@ -582,6 +582,8 @@ static void ShutdownPs()
|
||||
{
|
||||
SAFE_DELETE(g_GUI);
|
||||
|
||||
UnloadHotkeys();
|
||||
|
||||
SAFE_DELETE(g_Console);
|
||||
|
||||
// disable the special Windows cursor, or free textures for OGL cursors
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -172,6 +172,12 @@ void LoadHotkeys()
|
||||
}
|
||||
}
|
||||
|
||||
void UnloadHotkeys()
|
||||
{
|
||||
g_HotkeyMap.clear();
|
||||
g_HotkeyStatus.clear();
|
||||
}
|
||||
|
||||
bool isNegated(const SKey& key)
|
||||
{
|
||||
// Normal keycodes are below EXTRA_KEYS_BASE
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -42,6 +42,7 @@ const int SDL_HOTKEYDOWN = SDL_USEREVENT;
|
||||
const int SDL_HOTKEYUP = SDL_USEREVENT + 1;
|
||||
|
||||
extern void LoadHotkeys();
|
||||
extern void UnloadHotkeys();
|
||||
extern InReaction HotkeyInputHandler(const SDL_Event_* ev);
|
||||
|
||||
extern bool HotkeyIsPressed(const CStr& keyname);
|
||||
|
Loading…
Reference in New Issue
Block a user