mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Unload hotkeys on shutdown.
Fixes double registration of hotkeys on engine restart. This was SVN commit r15755.
This commit is contained in:
@@ -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
|
||||
|
||||
+2
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user