mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-23 07:44:18 +00:00
[core] Fix renderdoc API garbage (#3816)
Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3816
This commit is contained in:
parent
3ce5463d2d
commit
79f29abcba
|
|
@ -1,4 +1,4 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
|
|
@ -51,10 +51,12 @@ void RenderdocAPI::ToggleCapture() {
|
||||||
if (!rdoc_api) [[unlikely]] {
|
if (!rdoc_api) [[unlikely]] {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto* api = static_cast<RENDERDOC_API_1_6_0*>(rdoc_api);
|
||||||
if (!is_capturing) {
|
if (!is_capturing) {
|
||||||
rdoc_api->StartFrameCapture(NULL, NULL);
|
api->StartFrameCapture(NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
rdoc_api->EndFrameCapture(NULL, NULL);
|
api->EndFrameCapture(NULL, NULL);
|
||||||
}
|
}
|
||||||
is_capturing = !is_capturing;
|
is_capturing = !is_capturing;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
struct RENDERDOC_API_1_7_0;
|
|
||||||
|
|
||||||
namespace Tools {
|
namespace Tools {
|
||||||
|
|
||||||
class RenderdocAPI {
|
class RenderdocAPI {
|
||||||
|
|
@ -18,7 +16,7 @@ public:
|
||||||
void ToggleCapture();
|
void ToggleCapture();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RENDERDOC_API_1_7_0* rdoc_api{};
|
void* rdoc_api{};
|
||||||
bool is_capturing{false};
|
bool is_capturing{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue