From 82f16f7783c27b4badd05aea6860d3c06ad3d20e Mon Sep 17 00:00:00 2001 From: gerstrong Date: Wed, 22 Jul 2009 19:22:15 +0000 Subject: [PATCH] Added "Reset Controls" Feature under the Main-Menu Options->Controls git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@103 4df4b0f3-56ce-47cb-b001-ed939b7d65a6 --- src/sdl/CInput.cpp | 9 ++++++--- src/sdl/CInput.h | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/sdl/CInput.cpp b/src/sdl/CInput.cpp index c932e0500..5e77a09e2 100644 --- a/src/sdl/CInput.cpp +++ b/src/sdl/CInput.cpp @@ -18,7 +18,13 @@ #endif CInput::CInput() { + resetControls(); +} +CInput::~CInput() { +} + +void CInput::resetControls() { Uint8 i; m_exit = false; @@ -80,9 +86,6 @@ CInput::CInput() { } } -CInput::~CInput() { -} - short CInput::loadControlconfig(void) { FILE *fp; diff --git a/src/sdl/CInput.h b/src/sdl/CInput.h index fb01f0ab1..fe2c97d3c 100644 --- a/src/sdl/CInput.h +++ b/src/sdl/CInput.h @@ -163,8 +163,9 @@ public: void getEventName(int position, unsigned char input, char *buf); bool readNewEvent(Uint8 device, int position); - short loadControlconfig(void); - short saveControlconfig(void); + short loadControlconfig(); + void resetControls(); + short saveControlconfig(); void flushKeys(void); void flushCommands(void);