summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp2
-rw-r--r--src/commandline.cpp6
-rw-r--r--src/options.h4
3 files changed, 10 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index ed7efa69c..4a82ee9ce 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -560,6 +560,8 @@ void Client::gameInit()
mButtonPadding = mSkin->getPadding();
mButtonSpacing = mSkin->getOption("spacing", 3);
}
+ if (settings.options.error)
+ inputManager.executeAction(InputAction::ERROR);
}
Client::~Client()
diff --git a/src/commandline.cpp b/src/commandline.cpp
index 562726a1e..506242a2c 100644
--- a/src/commandline.cpp
+++ b/src/commandline.cpp
@@ -131,7 +131,7 @@ static void printVersion()
void parseOptions(const int argc, char *const argv[])
{
- const char *const optstring = "hvud:U:P:Dc:p:y:l:L:C:s:t:T:a:r";
+ const char *const optstring = "hvud:U:P:Dc:p:y:l:L:C:s:t:T:a:r:e";
const struct option long_options[] =
{
@@ -159,6 +159,7 @@ void parseOptions(const int argc, char *const argv[])
{ "server-type", required_argument, nullptr, 'y' },
{ "enable-ipc", no_argument, nullptr, 'I' },
{ "default-cursor", no_argument, nullptr, 'q' },
+ { "error", no_argument, nullptr, 'e' },
{ nullptr, 0, nullptr, 0 }
};
@@ -256,6 +257,9 @@ void parseOptions(const int argc, char *const argv[])
case 'q':
options.defaultCursor = true;
break;
+ case 'e':
+ options.error = true;
+ break;
default:
break;
}
diff --git a/src/options.h b/src/options.h
index 82839482b..0411c9efb 100644
--- a/src/options.h
+++ b/src/options.h
@@ -65,7 +65,8 @@ struct Options final
safeMode(false),
testMode(false),
ipc(false),
- defaultCursor(false)
+ defaultCursor(false),
+ error(false)
{}
A_DELETE_COPY(Options)
@@ -96,6 +97,7 @@ struct Options final
bool testMode;
bool ipc;
bool defaultCursor;
+ bool error;
};
#endif // OPTIONS_H