mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 15:00:34 +00:00
ImDebugger: Fix issue with HLE Modules window always showing, more granular sleep logging
This commit is contained in:
parent
659af60613
commit
5a3eeb9d9b
@ -252,6 +252,7 @@ double Instant::ElapsedSeconds() const {
|
||||
#endif
|
||||
|
||||
void sleep_ms(int ms, const char *reason) {
|
||||
// INFO_LOG(Log::System, "Sleep %d ms: %s", ms, reason);
|
||||
#ifdef _WIN32
|
||||
Sleep(ms);
|
||||
#elif defined(HAVE_LIBNX)
|
||||
|
@ -32,10 +32,10 @@
|
||||
|
||||
FrameTiming g_frameTiming;
|
||||
|
||||
void WaitUntil(double now, double timestamp) {
|
||||
void WaitUntil(double now, double timestamp, const char *reason) {
|
||||
#ifdef _WIN32
|
||||
while (time_now_d() < timestamp) {
|
||||
sleep_ms(1, "wait-until"); // Sleep for 1ms on this thread
|
||||
sleep_ms(1, reason); // Sleep for 1ms on this thread
|
||||
}
|
||||
#else
|
||||
const double left = timestamp - now;
|
||||
@ -71,7 +71,7 @@ void FrameTiming::DeferWaitUntil(double until, double *curTimePtr) {
|
||||
|
||||
void FrameTiming::PostSubmit() {
|
||||
if (waitUntil_ != 0.0) {
|
||||
WaitUntil(time_now_d(), waitUntil_);
|
||||
WaitUntil(time_now_d(), waitUntil_, "post-submit");
|
||||
if (curTimePtr_) {
|
||||
*curTimePtr_ = waitUntil_;
|
||||
curTimePtr_ = nullptr;
|
||||
|
@ -27,4 +27,4 @@ extern FrameTiming g_frameTiming;
|
||||
|
||||
Draw::PresentMode ComputePresentMode(Draw::DrawContext *draw, int *interval);
|
||||
|
||||
void WaitUntil(double now, double timestamp);
|
||||
void WaitUntil(double now, double timestamp, const char *reason);
|
||||
|
@ -445,7 +445,7 @@ static void DoFrameTiming(bool throttle, bool *skipFrame, float scaledTimestep,
|
||||
if (endOfFrame) {
|
||||
g_frameTiming.DeferWaitUntil(nextFrameTime, &curFrameTime);
|
||||
} else {
|
||||
WaitUntil(curFrameTime, nextFrameTime);
|
||||
WaitUntil(curFrameTime, nextFrameTime, "display-wait");
|
||||
curFrameTime = time_now_d(); // I guess we could also just set it to nextFrameTime...
|
||||
}
|
||||
}
|
||||
|
@ -418,7 +418,9 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug) {
|
||||
DrawAtracView(cfg_);
|
||||
}
|
||||
|
||||
if (cfg_.hleModulesOpen) {
|
||||
DrawHLEModules(cfg_);
|
||||
}
|
||||
|
||||
if (cfg_.structViewerOpen) {
|
||||
structViewer_.Draw(mipsDebug, &cfg_.structViewerOpen);
|
||||
|
Loading…
Reference in New Issue
Block a user