Get rid of outdated special case for gfx logs. Make some DEBUG things VERBOSE.

This commit is contained in:
Henrik Rydgard 2016-09-10 17:16:53 +02:00
parent de1643997f
commit 1c47778b4e
2 changed files with 9 additions and 12 deletions

View File

@ -579,7 +579,7 @@ static void DoFrameIdleTiming() {
void hleEnterVblank(u64 userdata, int cyclesLate) {
int vbCount = userdata;
DEBUG_LOG(SCEDISPLAY, "Enter VBlank %i", vbCount);
VERBOSE_LOG(SCEDISPLAY, "Enter VBlank %i", vbCount);
isVblank = 1;
vCount++; // vCount increases at each VBLANK.
@ -692,7 +692,7 @@ void hleAfterFlip(u64 userdata, int cyclesLate) {
void hleLeaveVblank(u64 userdata, int cyclesLate) {
isVblank = 0;
DEBUG_LOG(SCEDISPLAY,"Leave VBlank %i", (int)userdata - 1);
VERBOSE_LOG(SCEDISPLAY,"Leave VBlank %i", (int)userdata - 1);
CoreTiming::ScheduleEvent(msToCycles(frameMs - vblankMs) - cyclesLate, enterVblankEvent, userdata);
// Fire the vblank listeners after the vblank completes.
@ -989,7 +989,7 @@ static int sceDisplayGetAccumulatedHcount() {
static float sceDisplayGetFramePerSec() {
const static float framePerSec = 59.9400599f;
DEBUG_LOG(SCEDISPLAY,"%f=sceDisplayGetFramePerSec()", framePerSec);
VERBOSE_LOG(SCEDISPLAY,"%f=sceDisplayGetFramePerSec()", framePerSec);
return framePerSec; // (9MHz * 1)/(525 * 286)
}

View File

@ -384,7 +384,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
const char *fileToLog = 0;
const char *stateToLoad = 0;
bool gfxLog = false;
// Parse command line
LogTypes::LOG_LEVELS logLevel = LogTypes::LINFO;
for (int i = 1; i < argc; i++) {
@ -395,8 +394,10 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
// Note that you must also change the max log level in Log.h.
logLevel = LogTypes::LDEBUG;
break;
case 'g':
gfxLog = true;
case 'v':
// Enable verbose logging
// Note that you must also change the max log level in Log.h.
logLevel = LogTypes::LVERBOSE;
break;
case 'j':
g_Config.iCpuCore = CPU_CORE_JIT;
@ -460,17 +461,13 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++) {
LogTypes::LOG_TYPE type = (LogTypes::LOG_TYPE)i;
logman->SetEnable(type, true);
logman->SetLogLevel(type, (gfxLog && i == LogTypes::G3D) ? LogTypes::LDEBUG : logLevel);
logman->SetLogLevel(type, logLevel);
#ifdef ANDROID
logman->AddListener(type, logger);
#endif
}
#endif
// Special hack for G3D as it's very spammy. Need to make a flag for this.
if (!gfxLog) {
logman->SetLogLevel(LogTypes::G3D, LogTypes::LERROR);
logman->SetLogLevel(LogTypes::SCEGE, LogTypes::LERROR);
}
// Allow the lang directory to be overridden for testing purposes (e.g. Android, where it's hard to
// test new languages without recompiling the entire app, which is a hassle).
const std::string langOverridePath = g_Config.memStickDirectory + "PSP/SYSTEM/lang/";