2018-11-16 00:31:39 +01:00
|
|
|
/*****************************************************************************\
|
|
|
|
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 17:46:12 +02: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
|
|
|
|
|
2017-04-17 13:45:43 +02:00
|
|
|
#if DIRECTDRAW_SUPPORT
|
2017-04-03 01:12:55 +02:00
|
|
|
|
2010-09-25 17:46:12 +02: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;
|
|
|
|
|
2010-09-25 19:35:19 +02:00
|
|
|
unsigned char *convertBuffer;
|
|
|
|
unsigned int filterScale;
|
|
|
|
|
2010-09-25 17:46:12 +02:00
|
|
|
DDPIXELFORMAT DDPixelFormat;
|
|
|
|
public:
|
|
|
|
bool SetDisplayMode(
|
|
|
|
int pWidth, int pHeight, int pScale,
|
|
|
|
char pDepth, int pRefreshRate, bool pWindowed,
|
|
|
|
bool pDoubleBuffered);
|
|
|
|
void GetPixelFormat ();
|
|
|
|
void DeInitialize();
|
|
|
|
bool Initialize (HWND hWnd);
|
|
|
|
|
|
|
|
void Render(SSurface Src);
|
|
|
|
bool ApplyDisplayChanges(void);
|
|
|
|
bool ChangeRenderSize(unsigned int newWidth, unsigned int newHeight);
|
|
|
|
bool SetFullscreen(bool fullscreen);
|
|
|
|
void SetSnes9xColorFormat();
|
|
|
|
|
|
|
|
void EnumModes(std::vector<dMode> *modeVector);
|
|
|
|
|
|
|
|
CDirectDraw();
|
|
|
|
virtual ~CDirectDraw();
|
|
|
|
};
|
|
|
|
|
2017-04-03 01:12:55 +02:00
|
|
|
#endif
|
|
|
|
|
2010-09-25 17:46:12 +02:00
|
|
|
#endif // !defined(CDIRECTDRAW_H_INCLUDED)
|