mirror of https://github.com/odrling/Aegisub
Uninvert hotkey::Scan's return value
Originally committed to SVN as r5506.
This commit is contained in:
parent
ffe8c7a5d6
commit
dabcdb2e8b
|
@ -137,7 +137,7 @@ bool Hotkey::Scan(const std::string &context, const std::string &str, bool alway
|
|||
if (always && ctext == "Always") {
|
||||
cmd = index->second.CmdName();
|
||||
LOG_D("agi/hotkey/found") << "Found: " << str << " Context (req/found): " << context << "/Always Command: " << cmd;
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
if (ctext == "Default") {
|
||||
dfault = index->second.CmdName();
|
||||
|
@ -150,15 +150,15 @@ bool Hotkey::Scan(const std::string &context, const std::string &str, bool alway
|
|||
if (!local.empty()) {
|
||||
cmd = local;
|
||||
LOG_D("agi/hotkey/found") << "Found: " << str << " Context: " << context << " Command: " << local;
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
if (!dfault.empty()) {
|
||||
cmd = dfault;
|
||||
LOG_D("agi/hotkey/found") << "Found: " << str << " Context (req/found): " << context << "/Default Command: " << dfault;
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::string> Hotkey::GetHotkeys(const std::string &context, const std::string &command) const {
|
||||
|
|
|
@ -69,7 +69,7 @@ bool check(std::string const& context, int key_code, wchar_t key_char, int modif
|
|||
if (combo.empty()) return false;
|
||||
|
||||
std::string command;
|
||||
if (agi::hotkey::hotkey->Scan(context, combo, OPT_GET("Audio/Medusa Timing Hotkeys")->GetBool(), command) == 0) {
|
||||
if (agi::hotkey::hotkey->Scan(context, combo, OPT_GET("Audio/Medusa Timing Hotkeys")->GetBool(), command)) {
|
||||
/// The bottom line should be removed after all the hotkey commands are fixed.
|
||||
/// This is to avoid pointless exceptions.
|
||||
if (command.find("/") != std::string::npos) {
|
||||
|
|
Loading…
Reference in New Issue