mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 18:34:58 +00:00
code: Add clang-format target and CI workflow (#82)
* code: Add clang format target, rules and CI workflow * code: Run clang format on sources
This commit is contained in:
parent
32a5ff15bb
commit
6f4c6ae0bb
90 changed files with 2942 additions and 1941 deletions
|
@ -1,17 +1,17 @@
|
|||
#pragma once
|
||||
#include "common/types.h"
|
||||
#include <mutex>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Emulator::Host::Controller {
|
||||
struct State {
|
||||
u32 buttonsState =0;
|
||||
u32 buttonsState = 0;
|
||||
u64 time = 0;
|
||||
};
|
||||
|
||||
constexpr u32 MAX_STATES = 64;
|
||||
|
||||
class GameController {
|
||||
public:
|
||||
public:
|
||||
GameController();
|
||||
virtual ~GameController() = default;
|
||||
|
||||
|
@ -20,8 +20,7 @@ class GameController {
|
|||
void checKButton(int id, u32 button, bool isPressed);
|
||||
void addState(const State& state);
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
std::mutex m_mutex;
|
||||
bool m_connected = false;
|
||||
State m_last_state;
|
||||
|
@ -31,4 +30,4 @@ class GameController {
|
|||
State m_states[MAX_STATES];
|
||||
};
|
||||
|
||||
} // namespace Emulator::HLE::Libraries::Controller
|
||||
} // namespace Emulator::Host::Controller
|
Loading…
Add table
Add a link
Reference in a new issue