Merge pull request #12354 from Pokechu22/movie-extensionnumber

Use ExtensionNumber in Movie.cpp
This commit is contained in:
Tilka 2023-12-03 20:16:58 +00:00 committed by GitHub
commit 96c256f97a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 9 deletions

View File

@ -715,8 +715,8 @@ static void SetInputDisplayString(ControllerState padState, int controllerID)
} }
// NOTE: CPU Thread // NOTE: CPU Thread
static void SetWiiInputDisplayString(int remoteID, const DataReportBuilder& rpt, int ext, static void SetWiiInputDisplayString(int remoteID, const DataReportBuilder& rpt,
const EncryptionKey& key) ExtensionNumber ext, const EncryptionKey& key)
{ {
int controllerID = remoteID + 4; int controllerID = remoteID + 4;
@ -897,7 +897,7 @@ void RecordInput(const GCPadStatus* PadStatus, int controllerID)
} }
// NOTE: CPU Thread // NOTE: CPU Thread
void CheckWiimoteStatus(int wiimote, const DataReportBuilder& rpt, int ext, void CheckWiimoteStatus(int wiimote, const DataReportBuilder& rpt, ExtensionNumber ext,
const EncryptionKey& key) const EncryptionKey& key)
{ {
SetWiiInputDisplayString(wiimote, rpt, ext, key); SetWiiInputDisplayString(wiimote, rpt, ext, key);
@ -1297,7 +1297,7 @@ void PlayController(GCPadStatus* PadStatus, int controllerID)
} }
// NOTE: CPU Thread // NOTE: CPU Thread
bool PlayWiimote(int wiimote, WiimoteCommon::DataReportBuilder& rpt, int ext, bool PlayWiimote(int wiimote, WiimoteCommon::DataReportBuilder& rpt, ExtensionNumber ext,
const EncryptionKey& key) const EncryptionKey& key)
{ {
if (!IsPlayingInput() || !IsUsingWiimote(wiimote) || s_temp_input.empty()) if (!IsPlayingInput() || !IsUsingWiimote(wiimote) || s_temp_input.empty())

View File

@ -29,7 +29,8 @@ class DataReportBuilder;
namespace WiimoteEmu namespace WiimoteEmu
{ {
class EncryptionKey; class EncryptionKey;
} enum ExtensionNumber : u8;
} // namespace WiimoteEmu
// Per-(video )Movie actions // Per-(video )Movie actions
@ -185,15 +186,15 @@ bool PlayInput(const std::string& movie_path, std::optional<std::string>* savest
void LoadInput(const std::string& movie_path); void LoadInput(const std::string& movie_path);
void ReadHeader(); void ReadHeader();
void PlayController(GCPadStatus* PadStatus, int controllerID); void PlayController(GCPadStatus* PadStatus, int controllerID);
bool PlayWiimote(int wiimote, WiimoteCommon::DataReportBuilder& rpt, int ext, bool PlayWiimote(int wiimote, WiimoteCommon::DataReportBuilder& rpt,
const WiimoteEmu::EncryptionKey& key); WiimoteEmu::ExtensionNumber ext, const WiimoteEmu::EncryptionKey& key);
void EndPlayInput(bool cont); void EndPlayInput(bool cont);
void SaveRecording(const std::string& filename); void SaveRecording(const std::string& filename);
void DoState(PointerWrap& p); void DoState(PointerWrap& p);
void Shutdown(); void Shutdown();
void CheckPadStatus(const GCPadStatus* PadStatus, int controllerID); void CheckPadStatus(const GCPadStatus* PadStatus, int controllerID);
void CheckWiimoteStatus(int wiimote, const WiimoteCommon::DataReportBuilder& rpt, int ext, void CheckWiimoteStatus(int wiimote, const WiimoteCommon::DataReportBuilder& rpt,
const WiimoteEmu::EncryptionKey& key); WiimoteEmu::ExtensionNumber ext, const WiimoteEmu::EncryptionKey& key);
std::string GetInputDisplay(); std::string GetInputDisplay();
std::string GetRTCDisplay(); std::string GetRTCDisplay();