mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-25 11:46:27 +00:00
snake_case_a_lot
This commit is contained in:
parent
6bb8e0ef77
commit
50cd2cae87
9 changed files with 912 additions and 900 deletions
File diff suppressed because it is too large
Load diff
|
@ -173,23 +173,23 @@ private:
|
|||
uintptr_t slprs_exi_device_ptr;
|
||||
|
||||
// .slp File creation stuff
|
||||
u32 writtenByteCount = 0;
|
||||
u32 written_byte_count = 0;
|
||||
|
||||
// vars for metadata generation
|
||||
time_t game_start_time;
|
||||
s32 lastFrame;
|
||||
std::unordered_map<u8, std::unordered_map<u8, u32>> characterUsage;
|
||||
s32 last_frame;
|
||||
std::unordered_map<u8, std::unordered_map<u8, u32>> character_usage;
|
||||
|
||||
void updateMetadataFields(u8* payload, u32 length);
|
||||
void configureCommands(u8* payload, u8 length);
|
||||
void writeToFileAsync(u8* payload, u32 length, std::string fileOption);
|
||||
void writeToFileAsync(u8* payload, u32 length, std::string file_option);
|
||||
void writeToFile(std::unique_ptr<WriteMessage> msg);
|
||||
std::vector<u8> generateMetadata();
|
||||
void createNewFile();
|
||||
void closeFile();
|
||||
std::string generateFileName();
|
||||
bool checkFrameFullyFetched(s32 frameIndex);
|
||||
// bool shouldFFWFrame(s32 frameIndex);
|
||||
bool checkFrameFullyFetched(s32 frame_idx);
|
||||
// bool shouldFFWFrame(s32 frame_idx);
|
||||
|
||||
// std::ofstream log;
|
||||
|
||||
|
@ -200,7 +200,7 @@ private:
|
|||
u16 getRandomStage();
|
||||
bool isDisconnected();
|
||||
void handleOnlineInputs(u8* payload);
|
||||
void prepareOpponentInputs(s32 frame, bool shouldSkip);
|
||||
void prepareOpponentInputs(s32 frame, bool should_skip);
|
||||
void handleSendInputs(s32 frame, u8 delay, s32 checksum_frame, u32 checksum, u8* inputs);
|
||||
void handleCaptureSavestate(u8* payload);
|
||||
void handleLoadSavestate(u8* payload);
|
||||
|
@ -208,7 +208,7 @@ private:
|
|||
void startFindMatch(u8* payload);
|
||||
void prepareOnlineMatchState();
|
||||
void setMatchSelections(u8* payload);
|
||||
bool shouldSkipOnlineFrame(s32 frame, s32 finalizedFrame);
|
||||
bool shouldSkipOnlineFrame(s32 frame, s32 finalized_frame);
|
||||
bool shouldAdvanceOnlineFrame(s32 frame);
|
||||
void handleLogInRequest();
|
||||
void handleLogOutRequest();
|
||||
|
@ -225,7 +225,7 @@ private:
|
|||
// replay playback stuff
|
||||
void prepareGameInfo(u8* payload);
|
||||
void prepareGeckoList();
|
||||
void prepareCharacterFrameData(Slippi::FrameData* frame, u8 port, u8 isFollower);
|
||||
void prepareCharacterFrameData(Slippi::FrameData* frame, u8 port, u8 is_follower);
|
||||
void prepareFrameData(u8* payload);
|
||||
void prepareIsStockSteal(u8* payload);
|
||||
void prepareIsFileReady();
|
||||
|
@ -241,42 +241,42 @@ private:
|
|||
void prepareDelayResponse();
|
||||
void preparePremadeTextLength(u8* payload);
|
||||
void preparePremadeTextLoad(u8* payload);
|
||||
bool doesTagMatchInput(u8* input, u8 inputLen, std::string tag);
|
||||
bool doesTagMatchInput(u8* input, u8 input_len, std::string tag);
|
||||
|
||||
std::vector<u8> loadPremadeText(u8* payload);
|
||||
int getCharColor(u8 charId, u8 teamId);
|
||||
int getCharColor(u8 char_id, u8 team_id);
|
||||
|
||||
void FileWriteThread(void);
|
||||
|
||||
std::queue<std::unique_ptr<WriteMessage>> fileWriteQueue;
|
||||
bool writeThreadRunning = false;
|
||||
std::thread m_fileWriteThread;
|
||||
std::queue<std::unique_ptr<WriteMessage>> file_write_queue;
|
||||
bool write_thread_running = false;
|
||||
std::thread m_file_write_thread;
|
||||
|
||||
std::unordered_map<u8, std::string> getNetplayNames();
|
||||
|
||||
std::vector<u8> playbackSavestatePayload;
|
||||
std::vector<u8> geckoList;
|
||||
std::vector<u8> playback_savestate_payload;
|
||||
std::vector<u8> gecko_list;
|
||||
|
||||
u32 stallFrameCount = 0;
|
||||
bool isConnectionStalled = false;
|
||||
u32 stall_frame_count = 0;
|
||||
bool is_connection_stalled = false;
|
||||
|
||||
std::vector<u8> m_read_queue;
|
||||
std::unique_ptr<Slippi::SlippiGame> m_current_game = nullptr;
|
||||
SlippiMatchmaking::MatchSearchSettings last_search;
|
||||
SlippiMatchmaking::MatchmakeResult recent_mm_result;
|
||||
|
||||
std::vector<u16> stagePool;
|
||||
std::vector<u16> stage_pool;
|
||||
|
||||
// Used by ranked to set game prep selections
|
||||
std::vector<SlippiPlayerSelections> overwrite_selections;
|
||||
|
||||
u32 frameSeqIdx = 0;
|
||||
u32 frame_seq_idx = 0;
|
||||
|
||||
bool isEnetInitialized = false;
|
||||
bool is_enet_initialized = false;
|
||||
|
||||
std::default_random_engine generator;
|
||||
|
||||
std::string forcedError = "";
|
||||
std::string forced_error = "";
|
||||
|
||||
// Used to determine when to detect when a new session has started
|
||||
bool is_play_session_active = false;
|
||||
|
@ -287,31 +287,31 @@ private:
|
|||
u8 m_remote_player_index = 1;
|
||||
|
||||
// Frame skipping variables
|
||||
int framesToSkip = 0;
|
||||
bool isCurrentlySkipping = false;
|
||||
int frames_to_skip = 0;
|
||||
bool is_currently_skipping = false;
|
||||
|
||||
// Frame advancing variables
|
||||
int framesToAdvance = 0;
|
||||
bool isCurrentlyAdvancing = false;
|
||||
int fallBehindCounter = 0;
|
||||
int fallFarBehindCounter = 0;
|
||||
int frames_to_advance = 0;
|
||||
bool is_currently_advancing = false;
|
||||
int fall_behind_counter = 0;
|
||||
int fall_far_behind_counter = 0;
|
||||
|
||||
protected:
|
||||
void TransferByte(u8& byte) override;
|
||||
|
||||
private:
|
||||
SlippiPlayerSelections localSelections;
|
||||
SlippiPlayerSelections local_selections;
|
||||
|
||||
std::unique_ptr<SlippiUser> user;
|
||||
std::unique_ptr<SlippiGameFileLoader> gameFileLoader;
|
||||
std::unique_ptr<SlippiGameFileLoader> game_file_loader;
|
||||
std::unique_ptr<SlippiNetplayClient> slippi_netplay;
|
||||
std::unique_ptr<SlippiMatchmaking> matchmaking;
|
||||
std::unique_ptr<SlippiDirectCodes> directCodes;
|
||||
std::unique_ptr<SlippiDirectCodes> teamsCodes;
|
||||
std::unique_ptr<SlippiDirectCodes> direct_codes;
|
||||
std::unique_ptr<SlippiDirectCodes> teams_codes;
|
||||
|
||||
std::map<s32, std::unique_ptr<SlippiSavestate>> activeSavestates;
|
||||
std::deque<std::unique_ptr<SlippiSavestate>> availableSavestates;
|
||||
std::map<s32, std::unique_ptr<SlippiSavestate>> active_savestates;
|
||||
std::deque<std::unique_ptr<SlippiSavestate>> available_savestates;
|
||||
|
||||
std::vector<u16> allowedStages;
|
||||
std::vector<u16> allowed_stages;
|
||||
};
|
||||
} // namespace ExpansionInterface
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#define FRAME_INTERVAL 900
|
||||
#define SLEEP_TIME_MS 8
|
||||
|
||||
std::unique_ptr<SlippiPlaybackStatus> g_playbackStatus;
|
||||
extern std::unique_ptr<SlippiReplayComm> g_replayComm;
|
||||
std::unique_ptr<SlippiPlaybackStatus> g_playback_status;
|
||||
extern std::unique_ptr<SlippiReplayComm> g_replay_comm;
|
||||
|
||||
static std::mutex mtx;
|
||||
static std::mutex seekMtx;
|
||||
|
@ -67,7 +67,8 @@ SlippiPlaybackStatus::SlippiPlaybackStatus()
|
|||
targetFrameNum = INT_MAX;
|
||||
lastFrame = Slippi::PLAYBACK_FIRST_SAVE;
|
||||
#ifdef IS_PLAYBACK
|
||||
// Only generate these if this is a playback configuration. Should this class get initialized at all?
|
||||
// Only generate these if this is a playback configuration. Should this class get initialized at
|
||||
// all?
|
||||
generateDenylist();
|
||||
generateLegacyCodelist();
|
||||
#endif
|
||||
|
@ -192,7 +193,7 @@ void SlippiPlaybackStatus::seekToFrame()
|
|||
}
|
||||
|
||||
std::unique_lock<std::mutex> ffwLock(ffwMtx);
|
||||
auto replayCommSettings = g_replayComm->getSettings();
|
||||
auto replayCommSettings = g_replay_comm->getSettings();
|
||||
if (replayCommSettings.mode == "queue")
|
||||
updateWatchSettingsStartEnd();
|
||||
|
||||
|
@ -253,7 +254,7 @@ void SlippiPlaybackStatus::seekToFrame()
|
|||
|
||||
// We've reached the frame we want. Reset targetFrameNum and release mutex so another seek can
|
||||
// be performed
|
||||
g_playbackStatus->currentPlaybackFrame = targetFrameNum;
|
||||
g_playback_status->currentPlaybackFrame = targetFrameNum;
|
||||
targetFrameNum = INT_MAX;
|
||||
Core::SetState(prevState);
|
||||
seekMtx.unlock();
|
||||
|
@ -316,14 +317,14 @@ bool SlippiPlaybackStatus::shouldFFWFrame(s32 frameIndex) const
|
|||
|
||||
void SlippiPlaybackStatus::updateWatchSettingsStartEnd()
|
||||
{
|
||||
int startFrame = g_replayComm->current.startFrame;
|
||||
int endFrame = g_replayComm->current.endFrame;
|
||||
int startFrame = g_replay_comm->current.startFrame;
|
||||
int endFrame = g_replay_comm->current.endFrame;
|
||||
if (startFrame != Slippi::GAME_FIRST_FRAME || endFrame != INT_MAX)
|
||||
{
|
||||
if (g_playbackStatus->targetFrameNum < startFrame)
|
||||
g_replayComm->current.startFrame = g_playbackStatus->targetFrameNum;
|
||||
if (g_playbackStatus->targetFrameNum > endFrame)
|
||||
g_replayComm->current.endFrame = INT_MAX;
|
||||
if (g_playback_status->targetFrameNum < startFrame)
|
||||
g_replay_comm->current.startFrame = g_playback_status->targetFrameNum;
|
||||
if (g_playback_status->targetFrameNum > endFrame)
|
||||
g_replay_comm->current.endFrame = INT_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -350,29 +351,29 @@ inline std::string readString(json obj, std::string key)
|
|||
|
||||
int getOrderNumFromFileName(std::string name)
|
||||
{
|
||||
// Extract last value after a dash, then try to parse it into a number. This is the
|
||||
// number we will sort by. If there is no number present, the number used is 0.
|
||||
std::string last;
|
||||
std::istringstream f(name);
|
||||
std::string s;
|
||||
while (std::getline(f, s, '-'))
|
||||
{
|
||||
last = s;
|
||||
}
|
||||
// Extract last value after a dash, then try to parse it into a number. This is the
|
||||
// number we will sort by. If there is no number present, the number used is 0.
|
||||
std::string last;
|
||||
std::istringstream f(name);
|
||||
std::string s;
|
||||
while (std::getline(f, s, '-'))
|
||||
{
|
||||
last = s;
|
||||
}
|
||||
|
||||
int num;
|
||||
if (!TryParse(last, &num))
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
int num;
|
||||
if (!TryParse(last, &num))
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
|
||||
return num;
|
||||
return num;
|
||||
}
|
||||
|
||||
// Compares two intervals according to starting times.
|
||||
bool compareInjectionList(File::FSTEntry i1, File::FSTEntry i2)
|
||||
{
|
||||
return getOrderNumFromFileName(i1.virtualName) < getOrderNumFromFileName(i2.virtualName);
|
||||
return getOrderNumFromFileName(i1.virtualName) < getOrderNumFromFileName(i2.virtualName);
|
||||
}
|
||||
|
||||
void SlippiPlaybackStatus::generateDenylist()
|
||||
|
@ -389,8 +390,8 @@ void SlippiPlaybackStatus::generateDenylist()
|
|||
// Post 3.7.0: Recording/SendGameEnd.asm
|
||||
{0x8016d30c, true},
|
||||
// Online/Menus/InGame/InitInGame.asm
|
||||
// https://github.com/project-slippi/slippi-ssbm-asm/blame/7211b1cfe0792e0fa5ebfbac6bb493bda05d8ee2/Online/Menus/InGame/InitInGame.asm
|
||||
{0x8016e9b4, true},
|
||||
// https://github.com/project-slippi/slippi-ssbm-asm/blame/7211b1cfe0792e0fa5ebfbac6bb493bda05d8ee2/Online/Menus/InGame/InitInGame.asm
|
||||
{0x8016e9b4, true},
|
||||
|
||||
// Common codes not in our codebase
|
||||
// HUD Transparency v1.1 (https://smashboards.com/threads/transparent-hud-v1-1.508509/)
|
||||
|
@ -401,8 +402,8 @@ void SlippiPlaybackStatus::generateDenylist()
|
|||
// (https://smashboards.com/threads/color-overlays-for-iasa-frames.401474/post-19120928)
|
||||
{0x80071960, true},
|
||||
// Turn Green When Actionable (https://blippi.gg/codes)
|
||||
{0x800CC818, true},
|
||||
{0x8008A478, true},
|
||||
{0x800CC818, true},
|
||||
{0x8008A478, true},
|
||||
};
|
||||
|
||||
// Next we parse through the injection lists files to exclude all of our injections that don't
|
||||
|
@ -412,10 +413,10 @@ void SlippiPlaybackStatus::generateDenylist()
|
|||
auto entries = File::ScanDirectoryTree(injections_path, false);
|
||||
auto children = entries.children;
|
||||
|
||||
// First sort by the file names so later lists take precedence
|
||||
std::sort(children.begin(), children.end(), compareInjectionList);
|
||||
// First sort by the file names so later lists take precedence
|
||||
std::sort(children.begin(), children.end(), compareInjectionList);
|
||||
|
||||
for (auto &entry : children)
|
||||
for (auto& entry : children)
|
||||
{
|
||||
if (entry.isDirectory)
|
||||
continue;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "Common/Logging/LogManager.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
std::unique_ptr<SlippiReplayComm> g_replayComm;
|
||||
std::unique_ptr<SlippiReplayComm> g_replay_comm;
|
||||
|
||||
// https://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring
|
||||
// trim from start (in place)
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "VideoCommon/VertexShaderManager.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playbackStatus;
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playback_status;
|
||||
|
||||
constexpr const char* DUBOIS_ALGORITHM_SHADER = "dubois";
|
||||
|
||||
|
@ -561,9 +561,9 @@ void HotkeyScheduler::Run()
|
|||
if (IsHotkey(HK_SLIPPI_JUMP_BACK))
|
||||
{
|
||||
INFO_LOG_FMT(SLIPPI, "jump back");
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame - 1200;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame - 1200;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
@ -571,9 +571,9 @@ void HotkeyScheduler::Run()
|
|||
if (IsHotkey(HK_SLIPPI_STEP_BACK))
|
||||
{
|
||||
INFO_LOG_FMT(SLIPPI, "step back");
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame - 300;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame - 300;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
@ -581,9 +581,9 @@ void HotkeyScheduler::Run()
|
|||
if (IsHotkey(HK_SLIPPI_STEP_FORWARD))
|
||||
{
|
||||
INFO_LOG_FMT(SLIPPI, "step forward");
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame + 300;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame + 300;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
@ -591,9 +591,9 @@ void HotkeyScheduler::Run()
|
|||
if (IsHotkey(HK_SLIPPI_JUMP_FORWARD))
|
||||
{
|
||||
INFO_LOG_FMT(SLIPPI, "jump forward");
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame + 1200;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame + 1200;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playbackStatus;
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playback_status;
|
||||
|
||||
RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
|
||||
{
|
||||
|
@ -568,5 +568,5 @@ void RenderWidget::Exit()
|
|||
|
||||
void RenderWidget::PlaybackSeek()
|
||||
{
|
||||
g_playbackStatus->seekToFrame();
|
||||
g_playback_status->seekToFrame();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
#include "Core/ConfigManager.h"
|
||||
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
||||
|
||||
bool g_needInputForFrame;
|
||||
// SLIPPITODO: Do we need to make this extern?
|
||||
bool g_need_input_for_frame;
|
||||
|
||||
namespace ciface::Pipes
|
||||
{
|
||||
|
@ -225,7 +226,7 @@ bool PipeDevice::ParseCommand(const std::string& command)
|
|||
return false;
|
||||
if (tokens[0] == "FLUSH")
|
||||
{
|
||||
g_needInputForFrame = false;
|
||||
g_need_input_for_frame = false;
|
||||
return true;
|
||||
}
|
||||
if (tokens[0] == "PRESS" || tokens[0] == "RELEASE")
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "Core/Host.h"
|
||||
#include "VideoCommon/IconsMaterialDesign.h"
|
||||
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playbackStatus;
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playback_status;
|
||||
#endif
|
||||
|
||||
namespace OSD
|
||||
|
@ -350,7 +350,7 @@ bool SeekBarBehavior(const ImRect& bb, ImGuiID id, int* v, int v_min, int v_max,
|
|||
if (!isHeld)
|
||||
{
|
||||
value_changed = true;
|
||||
g_playbackStatus->targetFrameNum = *v;
|
||||
g_playback_status->targetFrameNum = *v;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -415,8 +415,9 @@ bool SeekBarBehavior(const ImRect& bb, ImGuiID id, int* v, int v_min, int v_max,
|
|||
// Progress bar
|
||||
if (!isHeld)
|
||||
{
|
||||
frame = (g_playbackStatus->targetFrameNum == INT_MAX) ? g_playbackStatus->currentPlaybackFrame :
|
||||
g_playbackStatus->targetFrameNum;
|
||||
frame = (g_playback_status->targetFrameNum == INT_MAX) ?
|
||||
g_playback_status->currentPlaybackFrame :
|
||||
g_playback_status->targetFrameNum;
|
||||
window->DrawList->AddLine(ImVec2(bb.Min.x, bb.Min.y - scaled_height * 0.002f),
|
||||
ImVec2(curr_grab_pos, bb.Min.y - scaled_height * 0.002f),
|
||||
ImGui::ColorConvertFloat4ToU32(ImVec4(0.0f, 1.0f, 0.0f, style.Alpha)),
|
||||
|
@ -628,7 +629,7 @@ void DrawSlippiPlaybackControls()
|
|||
ImGui::SetWindowFontScale(scaled_height / 2000.0f);
|
||||
|
||||
if (SeekBar("SlippiSeek", ImVec4(1.0f, 0.0f, 0.0f, 1.0f), &frame, Slippi::PLAYBACK_FIRST_SAVE,
|
||||
g_playbackStatus->lastFrame, 1.0, "%d"))
|
||||
g_playback_status->lastFrame, 1.0, "%d"))
|
||||
{
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
|
@ -644,9 +645,9 @@ void DrawSlippiPlaybackControls()
|
|||
// ImGui::SameLine(0.0f, 5.0f);
|
||||
if (ButtonCustom(ICON_MD_FAST_REWIND, ImVec2(BUTTON_WIDTH, BUTTON_WIDTH)))
|
||||
{
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame - 1200;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame - 1200;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
@ -664,9 +665,9 @@ void DrawSlippiPlaybackControls()
|
|||
ImGui::SetCursorPos(ImVec2(BUTTON_WIDTH, height - scaled_height * 0.0265f));
|
||||
if (ButtonCustom(ICON_MD_FIRST_PAGE, ImVec2(BUTTON_WIDTH, BUTTON_WIDTH)))
|
||||
{
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame - 300;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame - 300;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
@ -684,9 +685,9 @@ void DrawSlippiPlaybackControls()
|
|||
ImGui::SetCursorPos(ImVec2(BUTTON_WIDTH * 2, height - scaled_height * 0.0265f));
|
||||
if (ButtonCustom(ICON_MD_LAST_PAGE, ImVec2(BUTTON_WIDTH, BUTTON_WIDTH)))
|
||||
{
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame + 300;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame + 300;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
@ -704,9 +705,9 @@ void DrawSlippiPlaybackControls()
|
|||
ImGui::SetCursorPos(ImVec2(BUTTON_WIDTH * 3, height - scaled_height * 0.0265f));
|
||||
if (ButtonCustom(ICON_MD_FAST_FORWARD, ImVec2(BUTTON_WIDTH, BUTTON_WIDTH)))
|
||||
{
|
||||
if (g_playbackStatus->targetFrameNum == INT_MAX)
|
||||
if (g_playback_status->targetFrameNum == INT_MAX)
|
||||
{
|
||||
g_playbackStatus->targetFrameNum = g_playbackStatus->currentPlaybackFrame + 1200;
|
||||
g_playback_status->targetFrameNum = g_playback_status->currentPlaybackFrame + 1200;
|
||||
Host_PlaybackSeek();
|
||||
}
|
||||
}
|
||||
|
@ -886,8 +887,8 @@ void DrawSlippiPlaybackControls()
|
|||
|
||||
// Time text
|
||||
ImGui::SetCursorPos(ImVec2(BUTTON_WIDTH * 8, height - scaled_height * 0.024f));
|
||||
auto playbackTime = GetTimeForFrame(g_playbackStatus->currentPlaybackFrame);
|
||||
auto endTime = GetTimeForFrame(g_playbackStatus->lastFrame);
|
||||
auto playbackTime = GetTimeForFrame(g_playback_status->currentPlaybackFrame);
|
||||
auto endTime = GetTimeForFrame(g_playback_status->lastFrame);
|
||||
auto timeString = playbackTime + " / " + endTime;
|
||||
ImGui::Text("%s", timeString.c_str());
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
#include "Core/Slippi/SlippiPlayback.h"
|
||||
#include "Core/Slippi/SlippiReplayComm.h"
|
||||
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playbackStatus;
|
||||
extern std::unique_ptr<SlippiReplayComm> g_replayComm;
|
||||
extern std::unique_ptr<SlippiPlaybackStatus> g_playback_status;
|
||||
extern std::unique_ptr<SlippiReplayComm> g_replay_comm;
|
||||
#endif
|
||||
|
||||
std::unique_ptr<Renderer> g_renderer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue