Add perf counter to d3d frame.

This commit is contained in:
Themaister 2012-11-04 00:14:43 +01:00
parent 29158640e6
commit 18f704988d

View File

@ -22,6 +22,7 @@
#include "config_file.hpp"
#include "../gfx_common.h"
#include "../../compat/posix_string.h"
#include "../../performance.h"
#include <iostream>
#include <exception>
@ -467,6 +468,8 @@ bool D3DVideo::frame(const void *frame,
unsigned width, unsigned height, unsigned pitch,
const char *msg)
{
RARCH_PERFORMANCE_INIT(d3d_frame);
RARCH_PERFORMANCE_START(d3d_frame);
// We cannot recover in fullscreen.
if (needs_restore && IsIconic(hWnd))
return true;
@ -502,6 +505,8 @@ bool D3DVideo::frame(const void *frame,
dev->EndScene();
}
RARCH_PERFORMANCE_STOP(d3d_frame);
if (dev->Present(nullptr, nullptr, nullptr, nullptr) != D3D_OK)
{
needs_restore = true;