snes9x/win32/CDirectDraw.h

69 lines
1.7 KiB
C
Raw Permalink Normal View History

/*****************************************************************************\
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
This file is licensed under the Snes9x License.
For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/
2010-09-25 15:46:12 +00:00
// CDirectDraw.h: interface for the CDirectDraw class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(CDIRECTDRAW_H_INCLUDED)
#define CDIRECTDRAW_H_INCLUDED
#include "IS9xDisplayOutput.h"
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#if DIRECTDRAW_SUPPORT
2010-09-25 15:46:12 +00:00
class CDirectDraw: public IS9xDisplayOutput
{
public:
HRESULT dErr;
LPDIRECTDRAW lpDD;
LPDIRECTDRAWCLIPPER lpDDClipper;
LPDIRECTDRAWPALETTE lpDDPalette;
LPDIRECTDRAWSURFACE2 lpDDSPrimary2;
LPDIRECTDRAWSURFACE2 lpDDSOffScreen2;
RECT SizeHistory [10];
int width, height;
char depth;
bool doubleBuffered;
bool clipped;
bool dDinitialized;
unsigned char *convertBuffer;
unsigned int filterScale;
2010-09-25 15:46:12 +00:00
DDPIXELFORMAT DDPixelFormat;
public:
bool SetDisplayMode(
int pWidth, int pHeight, int pScale,
char pDepth, int pRefreshRate, bool pWindowed,
bool pDoubleBuffered);
void GetPixelFormat ();
void DeInitialize() override;
bool Initialize (HWND hWnd) override;
2010-09-25 15:46:12 +00:00
void Render(SSurface Src) override;
bool ApplyDisplayChanges(void) override;
bool ChangeRenderSize(unsigned int newWidth, unsigned int newHeight) override;
bool SetFullscreen(bool fullscreen) override;
void SetSnes9xColorFormat() override;
2010-09-25 15:46:12 +00:00
void EnumModes(std::vector<dMode> *modeVector) override;
2010-09-25 15:46:12 +00:00
CDirectDraw();
virtual ~CDirectDraw();
};
#endif
2010-09-25 15:46:12 +00:00
#endif // !defined(CDIRECTDRAW_H_INCLUDED)