mirror of https://github.com/AxioDL/metaforce.git
Improve Optick events
This commit is contained in:
parent
d310dcfecb
commit
1b4e0dc754
|
@ -1,5 +1,7 @@
|
|||
#include "Runtime/CDvdFile.hpp"
|
||||
|
||||
#include <optick.h>
|
||||
|
||||
#include "Runtime/CDvdRequest.hpp"
|
||||
#include "Runtime/CStopwatch.hpp"
|
||||
|
||||
|
@ -67,6 +69,8 @@ std::vector<std::shared_ptr<IDvdRequest>> CDvdFile::m_RequestQueue;
|
|||
|
||||
void CDvdFile::WorkerProc() {
|
||||
logvisor::RegisterThreadName("CDvdFile");
|
||||
OPTICK_THREAD("CDvdFile");
|
||||
|
||||
while (m_WorkerRun.load()) {
|
||||
std::unique_lock lk{m_WorkerMutex};
|
||||
while (!m_RequestQueue.empty()) {
|
||||
|
|
|
@ -337,8 +337,6 @@ public:
|
|||
}
|
||||
|
||||
void onAppIdle() noexcept {
|
||||
OPTICK_FRAME("MainThread");
|
||||
|
||||
if (!m_deferredProject.empty()) {
|
||||
hecl::SystemString subPath;
|
||||
hecl::ProjectRootPath projPath = hecl::SearchForProject(m_deferredProject, subPath);
|
||||
|
@ -363,7 +361,11 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
m_window->waitForRetrace();
|
||||
{
|
||||
OPTICK_EVENT("Wait for Retrace");
|
||||
m_window->waitForRetrace();
|
||||
}
|
||||
OPTICK_FRAME("MainThread");
|
||||
|
||||
boo::SWindowRect rect = m_windowCallback.m_lastRect;
|
||||
rect.location = {0, 0};
|
||||
|
|
|
@ -1120,6 +1120,7 @@ void ImGuiConsole::ShowAppMainMenuBar(bool canInspect) {
|
|||
|
||||
s32 TranslateBooSpecialKey(boo::ESpecialKey key) { return 256 + static_cast<int>(key); }
|
||||
void ImGuiConsole::PreUpdate() {
|
||||
OPTICK_EVENT();
|
||||
if (!m_isInitialized) {
|
||||
m_isInitialized = true;
|
||||
m_cvarCommons.m_debugOverlayShowFrameCounter->addListener(
|
||||
|
@ -1198,6 +1199,7 @@ void ImGuiConsole::PreUpdate() {
|
|||
}
|
||||
|
||||
void ImGuiConsole::PostUpdate() {
|
||||
OPTICK_EVENT();
|
||||
if (g_StateManager != nullptr && g_StateManager->GetObjectList()) {
|
||||
// Clear deleted objects
|
||||
CObjectList& list = g_StateManager->GetAllObjectList();
|
||||
|
|
|
@ -824,6 +824,7 @@ void CGameArea::StartStreamIn(CStateManager& mgr) {
|
|||
if (xf0_24_postConstructed || xf0_27_loadPaused)
|
||||
return;
|
||||
|
||||
OPTICK_EVENT();
|
||||
VerifyTokenList(mgr);
|
||||
|
||||
if (!xf0_26_tokensReady) {
|
||||
|
|
Loading…
Reference in New Issue