mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-10 07:21:36 +00:00
Add an FLOG if profiler depth goes negative. Make Crash()/FLOG actually crash on win64.
This commit is contained in:
parent
316d6ab84d
commit
32a75bea46
@ -19,7 +19,7 @@
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifdef _M_X64
|
||||
inline void Crash() { /*DebugBreak();*/ }
|
||||
inline void Crash() { int *x = (int *)1337; *x = 1; }
|
||||
#else
|
||||
inline void Crash() { __asm { int 3 }; }
|
||||
#endif
|
||||
|
@ -125,6 +125,9 @@ void internal_profiler_leave(int category) {
|
||||
history[profiler.historyPos].count[category]++;
|
||||
|
||||
profiler.depth--;
|
||||
if (profiler.depth < 0) {
|
||||
FLOG("Profiler enter/leave mismatch!");
|
||||
}
|
||||
int parent = profiler.parentCategory[profiler.depth];
|
||||
if (parent != -1) {
|
||||
// Resume tracking the parent.
|
||||
|
Loading…
Reference in New Issue
Block a user