mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
Add perf counter to d3d frame.
This commit is contained in:
parent
29158640e6
commit
18f704988d
@ -22,6 +22,7 @@
|
|||||||
#include "config_file.hpp"
|
#include "config_file.hpp"
|
||||||
#include "../gfx_common.h"
|
#include "../gfx_common.h"
|
||||||
#include "../../compat/posix_string.h"
|
#include "../../compat/posix_string.h"
|
||||||
|
#include "../../performance.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
@ -467,6 +468,8 @@ bool D3DVideo::frame(const void *frame,
|
|||||||
unsigned width, unsigned height, unsigned pitch,
|
unsigned width, unsigned height, unsigned pitch,
|
||||||
const char *msg)
|
const char *msg)
|
||||||
{
|
{
|
||||||
|
RARCH_PERFORMANCE_INIT(d3d_frame);
|
||||||
|
RARCH_PERFORMANCE_START(d3d_frame);
|
||||||
// We cannot recover in fullscreen.
|
// We cannot recover in fullscreen.
|
||||||
if (needs_restore && IsIconic(hWnd))
|
if (needs_restore && IsIconic(hWnd))
|
||||||
return true;
|
return true;
|
||||||
@ -502,6 +505,8 @@ bool D3DVideo::frame(const void *frame,
|
|||||||
dev->EndScene();
|
dev->EndScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RARCH_PERFORMANCE_STOP(d3d_frame);
|
||||||
|
|
||||||
if (dev->Present(nullptr, nullptr, nullptr, nullptr) != D3D_OK)
|
if (dev->Present(nullptr, nullptr, nullptr, nullptr) != D3D_OK)
|
||||||
{
|
{
|
||||||
needs_restore = true;
|
needs_restore = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user