Skip to content

Commit

Permalink
Style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-derevenetz committed Jan 16, 2025
1 parent 8a217a6 commit 6e31b1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/fheroes2/game/game_hotkeys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ namespace
= { Game::HotKeyCategory::GLOBAL, gettext_noop( "hotkey|toggle fullscreen" ), fheroes2::Key::KEY_F4 };
hotKeyEventInfo[hotKeyEventToInt( Game::HotKeyEvent::GLOBAL_TOGGLE_TEXT_SUPPORT_MODE )]
= { Game::HotKeyCategory::GLOBAL, gettext_noop( "hotkey|toggle text support mode" ), fheroes2::Key::KEY_F10 };

#if defined( WITH_DEBUG )
hotKeyEventInfo[hotKeyEventToInt( Game::HotKeyEvent::DEBUG_TOGGLE_DEVELOPER_MODE )]
= { Game::HotKeyCategory::GLOBAL, gettext_noop( "hotkey|toggle developer mode" ), fheroes2::Key::KEY_BACKQUOTE };
Expand Down Expand Up @@ -486,6 +487,9 @@ void Game::globalKeyDownEvent( const fheroes2::Key key, const int32_t modifier )
conf.Save( Settings::configFileName );
}
#if defined( WITH_DEBUG )
else if ( key == hotKeyEventInfo[hotKeyEventToInt( HotKeyEvent::DEBUG_TOGGLE_DEVELOPER_MODE )].key ) {
Logging::setDebugLevel( DBG_DEVEL ^ Logging::getDebugLevel() );
}
else if ( key == hotKeyEventInfo[hotKeyEventToInt( HotKeyEvent::WORLD_TRANSFER_CONTROL_TO_AI )].key ) {
static bool recursiveCall = false;

Expand Down Expand Up @@ -537,9 +541,6 @@ void Game::globalKeyDownEvent( const fheroes2::Key key, const int32_t modifier )
}
}
}
else if ( key == hotKeyEventInfo[hotKeyEventToInt( HotKeyEvent::DEBUG_TOGGLE_DEVELOPER_MODE )].key ) {
Logging::setDebugLevel( DBG_DEVEL ^ Logging::getDebugLevel() );
}
#endif
}

Expand Down
1 change: 1 addition & 0 deletions src/fheroes2/game/game_hotkeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace Game

GLOBAL_TOGGLE_FULLSCREEN,
GLOBAL_TOGGLE_TEXT_SUPPORT_MODE,

#if defined( WITH_DEBUG )
// This hotkey is only for debug mode.
DEBUG_TOGGLE_DEVELOPER_MODE,
Expand Down

0 comments on commit 6e31b1b

Please sign in to comment.