Add option to dump the contents of RAM to a file
This commit is contained in:
@ -1026,6 +1026,24 @@ void QtHostInterface::stopDumpingAudio()
|
||||
StopDumpingAudio();
|
||||
}
|
||||
|
||||
void QtHostInterface::dumpRAM(const QString& filename)
|
||||
{
|
||||
if (!isOnWorkerThread())
|
||||
{
|
||||
QMetaObject::invokeMethod(this, "dumpRAM", Q_ARG(const QString&, filename));
|
||||
return;
|
||||
}
|
||||
|
||||
if (System::IsShutdown())
|
||||
return;
|
||||
|
||||
const std::string filename_str = filename.toStdString();
|
||||
if (System::DumpRAM(filename_str.c_str()))
|
||||
ReportFormattedMessage("RAM dumped to '%s'", filename_str.c_str());
|
||||
else
|
||||
ReportFormattedMessage("Failed to dump RAM to '%s'", filename_str.c_str());
|
||||
}
|
||||
|
||||
void QtHostInterface::saveScreenshot()
|
||||
{
|
||||
if (!isOnWorkerThread())
|
||||
|
||||
Reference in New Issue
Block a user