Skip to content

Commit

Permalink
Add a bit of documentation for ai-inputs code.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfi1 committed Sep 9, 2024
1 parent 0e1f5eb commit ff8b89b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Core/Core/HW/EXI_DeviceSlippi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3382,6 +3382,11 @@ void CEXISlippi::DMAWrite(u32 _uAddr, u32 _uSize)
break;
}
case CMD_OVERWRITE_INPUTS:
// Overwrite controller states from Pipe inputs used by bots.
// A custom gecko code is required; see
// https://github.com/project-slippi/slippi-ssbm-asm/tree/feature/ai-inputs
// This is needed when using the fast-forward code from the same repo, as
// it bypasses dolphin's normal way of feeding inputs into the game.
prepareOverwriteInputs();
break;
default:
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class PipeDevice : public Core::Device
std::string m_buf;
std::map<std::string, PipeInput*> m_buttons;
std::map<std::string, PipeInput*> m_axes;

// This is used for an alternative input method that writes the controller
// state directly into game memory; see EXI_DeviceSlippi::prepareOverwriteInputs()
SlippiPad m_current_pad;
};
}
Expand Down

0 comments on commit ff8b89b

Please sign in to comment.