Add renderdoc API support (#585)
* Add renderdoc API support * FIx renderdoc include directory * Fix RenderDoc linking * Fix Renderdoc linking (again) * Maybe fix renderdoc
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "renderdoc.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
@@ -32,6 +34,10 @@ Emulator::Emulator()
|
||||
audioDevice.init(dsp->getSamples());
|
||||
setAudioEnabled(config.audioEnabled);
|
||||
|
||||
if (Renderdoc::isSupported() && config.enableRenderdoc) {
|
||||
loadRenderdoc();
|
||||
}
|
||||
|
||||
#ifdef PANDA3DS_ENABLE_DISCORD_RPC
|
||||
if (config.discordRpcEnabled) {
|
||||
discordRpc.init();
|
||||
@@ -431,3 +437,9 @@ void Emulator::setAudioEnabled(bool enable) {
|
||||
|
||||
dsp->setAudioEnabled(enable);
|
||||
}
|
||||
|
||||
void Emulator::loadRenderdoc() {
|
||||
std::string capturePath = (std::filesystem::current_path() / "RenderdocCaptures").generic_string();
|
||||
Renderdoc::loadRenderdoc();
|
||||
Renderdoc::setOutputDir(capturePath, "");
|
||||
}
|
||||
Reference in New Issue
Block a user