mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Add explicit functions to initialise and shutdown replay. Closes #1685
* It's required for replay applications to call InitialiseReplay() before doing any work, and to call ShutdownReplay() once they're finished. * This lets us do more heavyweight shutdown work before global destructors are being invoked and the RenderDoc instance is being destroyed. * Anything that needs to be shut down during capture still has to happen in RenderDoc::~RenderDoc since we obviously can't get the application to call a shutdown function in that situation.
This commit is contained in:
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
|
||||
coreargs.push_back("--crash");
|
||||
for(const QString &arg : remaining)
|
||||
coreargs.push_back(arg);
|
||||
RENDERDOC_InitGlobalEnv(env, coreargs);
|
||||
RENDERDOC_InitialiseReplay(env, coreargs);
|
||||
}
|
||||
|
||||
if(!crashReportPath.isEmpty())
|
||||
@@ -490,6 +490,8 @@ int main(int argc, char *argv[])
|
||||
config.Save();
|
||||
}
|
||||
|
||||
RENDERDOC_ShutdownReplay();
|
||||
|
||||
PythonContext::GlobalShutdown();
|
||||
|
||||
Formatter::shutdown();
|
||||
|
||||
Reference in New Issue
Block a user