[Video] Make sure to close trace
This commit is contained in:
parent
f76769622c
commit
58305edc8b
|
@ -675,6 +675,7 @@ void CALL CloseDLL(void)
|
|||
voodoo.gamma_table_g = 0;
|
||||
delete[] voodoo.gamma_table_b;
|
||||
voodoo.gamma_table_b = 0;
|
||||
StopTrace();
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
|
|
@ -270,7 +270,7 @@ void FullScreenResolutions::init()
|
|||
int current = 0;
|
||||
char smode[256];
|
||||
memset(&enumMode, 0, sizeof(DEVMODE));
|
||||
memset(&prevInfo, 0, sizeof(ResolutionInfo));
|
||||
prevInfo = ResolutionInfo();
|
||||
while (EnumDisplaySettings(NULL, iModeNum++, &enumMode) != 0)
|
||||
{
|
||||
ResolutionInfo curInfo(NULL, enumMode.dmPelsWidth, enumMode.dmPelsHeight, enumMode.dmDisplayFrequency);
|
||||
|
|
|
@ -97,3 +97,13 @@ void StartTrace(void)
|
|||
g_LogFile = new CTraceFileLog(LogFilePath, g_settings->FlushLogs(), CLog::Log_New, 500);
|
||||
TraceAddModule(g_LogFile);
|
||||
}
|
||||
|
||||
void StopTrace(void)
|
||||
{
|
||||
if (g_LogFile)
|
||||
{
|
||||
TraceRemoveModule(g_LogFile);
|
||||
delete g_LogFile;
|
||||
g_LogFile = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,3 +30,4 @@ enum TraceModuleGlide64
|
|||
|
||||
void SetupTrace(void);
|
||||
void StartTrace(void);
|
||||
void StopTrace(void);
|
||||
|
|
Loading…
Reference in New Issue