core: De-globalize movie (#6659)
This commit is contained in:
parent
a955f02771
commit
f8b8b6e53c
51 changed files with 182 additions and 104 deletions
|
@ -23,25 +23,29 @@ union PadState;
|
|||
} // namespace Service
|
||||
|
||||
namespace Core {
|
||||
|
||||
class System;
|
||||
struct CTMHeader;
|
||||
struct ControllerState;
|
||||
|
||||
class Movie {
|
||||
public:
|
||||
enum class PlayMode { None, Recording, Playing, MovieFinished };
|
||||
enum class ValidationResult {
|
||||
enum class PlayMode : u32 {
|
||||
None,
|
||||
Recording,
|
||||
Playing,
|
||||
MovieFinished,
|
||||
};
|
||||
|
||||
enum class ValidationResult : u32 {
|
||||
OK,
|
||||
RevisionDismatch,
|
||||
InputCountDismatch,
|
||||
Invalid,
|
||||
};
|
||||
/**
|
||||
* Gets the instance of the Movie singleton class.
|
||||
* @returns Reference to the instance of the Movie singleton class.
|
||||
*/
|
||||
static Movie& GetInstance() {
|
||||
return s_instance;
|
||||
}
|
||||
|
||||
explicit Movie(const Core::System& system);
|
||||
~Movie();
|
||||
|
||||
void SetPlaybackCompletionCallback(std::function<void()> completion_callback);
|
||||
void StartPlayback(const std::string& movie_file);
|
||||
|
@ -133,8 +137,6 @@ public:
|
|||
void SaveMovie();
|
||||
|
||||
private:
|
||||
static Movie s_instance;
|
||||
|
||||
void CheckInputEnd();
|
||||
|
||||
template <typename... Targs>
|
||||
|
@ -159,6 +161,8 @@ private:
|
|||
ValidationResult ValidateHeader(const CTMHeader& header) const;
|
||||
ValidationResult ValidateInput(std::span<const u8> input, u64 expected_count) const;
|
||||
|
||||
private:
|
||||
const Core::System& system;
|
||||
PlayMode play_mode;
|
||||
|
||||
std::string record_movie_file;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue