1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00
narzoul e8f987eb05 Create repository surfaces on the appropriate device
This change assigns a different DirectDraw repository object for each original
DirectDraw object that requires temporary surfaces, ensuring that video memory
surfaces are created on the appropriate device on a multi-GPU system.
2016-10-31 13:48:05 +01:00

32 lines
519 B
C++

#pragma once
#define CINTERFACE
#include <ddraw.h>
#include "Common/CompatRef.h"
#include "Common/CompatWeakPtr.h"
namespace DDraw
{
namespace Repository
{
struct Surface
{
void* ddObject;
DDSURFACEDESC2 desc;
CompatWeakPtr<IDirectDrawSurface7> surface;
};
class ScopedSurface : public Surface
{
public:
ScopedSurface(CompatRef<IDirectDraw7> dd, const DDSURFACEDESC2& desc);
~ScopedSurface();
};
CompatWeakPtr<IDirectDraw7> getDirectDraw();
void onRelease(void* ddObject);
}
}