1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fix style

This commit is contained in:
Ivan Savenko
2024-04-30 15:23:19 +03:00
parent 1dc27046ef
commit f593321f4c
2 changed files with 12 additions and 11 deletions

View File

@@ -10,11 +10,12 @@
#include "StdInc.h"
#include "InputSourceGameController.h"
#include "InputHandler.h"
#include "../CGameInfo.h"
#include "../gui/CursorHandler.h"
#include "../gui/CGuiHandler.h"
#include "../gui/CursorHandler.h"
#include "../gui/EventDispatcher.h"
#include "../gui/ShortcutHandler.h"
@@ -50,7 +51,6 @@ void InputSourceGameController::tryOpenAllGameControllers()
logGlobal->warn("Joystick %d is an unsupported game controller!", i);
}
void InputSourceGameController::openGameController(int index)
{
SDL_GameController * controller = SDL_GameControllerOpen(index);
@@ -163,7 +163,7 @@ void InputSourceGameController::handleEventAxisMotion(const SDL_ControllerAxisEv
auto axisActions = GH.shortcuts().translateJoystickAxis(axisName);
auto buttonActions = GH.shortcuts().translateJoystickButton(axisName);
for (auto const & action : axisActions)
for(const auto & action : axisActions)
{
switch(action)
{
@@ -238,7 +238,8 @@ void InputSourceGameController::handleUpdate()
{
auto now = std::chrono::high_resolution_clock::now();
auto nowMs = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()).count();
if (lastCheckTime == 0) {
if(lastCheckTime == 0)
{
lastCheckTime = nowMs;
return;
}

View File

@@ -13,8 +13,8 @@
#include <SDL_events.h>
#include <SDL_gamecontroller.h>
#include "../gui/Shortcut.h"
#include "../../lib/Point.h"
#include "../gui/Shortcut.h"
constexpr int AXIS_DEAD_ZOOM = 6000;
constexpr int AXIS_MAX_ZOOM = 32000;