More nice touches to DiscordRPC

This commit is contained in:
SimoneN64
2024-08-27 22:31:55 +02:00
parent 86bfeec8bd
commit 5f7a2fa65f
7 changed files with 83 additions and 46 deletions

View File

@@ -3,7 +3,7 @@
#include <Scheduler.hpp>
namespace n64 {
Core::Core(ParallelRDP &parallel) : cpu(std::make_unique<JIT>(parallel)) {}
Core::Core(ParallelRDP &parallel) : cpu(std::make_unique<Interpreter>(parallel)) {}
void Core::Stop() {
render = false;

View File

@@ -29,6 +29,7 @@ union TASMovieControllerData {
static_assert(sizeof(TASMovieControllerData) == 4);
bool MupenMovie::Load(const fs::path &path) {
filename = path.stem().string();
loadedTasMovie = Util::ReadFileBinary(path.string());
if (!IsLoaded()) {
Util::error("Error loading movie!");

View File

@@ -51,9 +51,11 @@ struct MupenMovie {
bool Load(const fs::path &);
void Reset();
n64::Controller NextInputs();
bool IsLoaded() const { return !loadedTasMovie.empty(); }
[[nodiscard]] bool IsLoaded() const { return !loadedTasMovie.empty(); }
[[nodiscard]] const std::string &GetFilename() const { return filename; }
private:
std::string filename{};
std::vector<u8> loadedTasMovie = {};
TASMovieHeader loadedTasMovieHeader = {};
uint32_t loadedTasMovieIndex = 0;