mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 09:13:39 +01:00
Core: Allow forcing debug statistics collection.
Useful for remote debugging.
This commit is contained in:
1 parent
a06efdd222
commit
1532a729d7
3 files changed
+19
-7
No files matched your search
+13
-3
@@ -98,7 +98,7 @@ static std::string loadingReason;
|
||||
bool audioInitialized;
|
||||
|
||||
bool coreCollectDebugStats = false;
|
||||
bool coreCollectDebugStatsForced = false;
|
||||
static int coreCollectDebugStatsCounter = 0;
|
||||
|
||||
// This can be read and written from ANYWHERE.
|
||||
volatile CoreState coreState = CORE_STEPPING;
|
||||
@@ -385,8 +385,9 @@ void Core_UpdateState(CoreState newState) {
|
||||
}
|
||||
|
||||
void Core_UpdateDebugStats(bool collectStats) {
|
||||
if (coreCollectDebugStats != collectStats) {
|
||||
coreCollectDebugStats = collectStats;
|
||||
bool newState = collectStats || coreCollectDebugStatsCounter > 0;
|
||||
if (coreCollectDebugStats != newState) {
|
||||
coreCollectDebugStats = newState;
|
||||
mipsr4k.ClearJitCache();
|
||||
}
|
||||
|
||||
@@ -394,6 +395,15 @@ void Core_UpdateDebugStats(bool collectStats) {
|
||||
gpuStats.ResetFrame();
|
||||
}
|
||||
|
||||
void Core_ForceDebugStats(bool enable) {
|
||||
if (enable) {
|
||||
coreCollectDebugStatsCounter++;
|
||||
} else {
|
||||
coreCollectDebugStatsCounter--;
|
||||
}
|
||||
_assert_(coreCollectDebugStatsCounter >= 0);
|
||||
}
|
||||
|
||||
bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) {
|
||||
if (pspIsIniting || pspIsQuitting) {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user