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:
wheremyfoodat
2024-08-23 02:30:25 +00:00
committed by GitHub
parent 471bdd6ab9
commit 2754df9b94
10 changed files with 942 additions and 4 deletions

View File

@@ -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, "");
}