1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00
DDrawCompat/DDrawCompat/CompatPrimarySurface.h
narzoul 5e972cf056 Handle WM_ACTIVATEAPP messages
Aiming to fix Alt-Tabbing issues (such as black screen instead of desktop)
by temporarily setting the cooperative level to windowed mode, restoring
the display mode and minimizing the main window when the app is inactive.
2016-05-03 22:12:25 +02:00

32 lines
604 B
C++

#pragma once
#define CINTERFACE
#include <ddraw.h>
class IReleaseNotifier;
namespace CompatPrimarySurface
{
struct DisplayMode
{
LONG width;
LONG height;
DDPIXELFORMAT pixelFormat;
DWORD refreshRate;
};
template <typename TDirectDraw>
DisplayMode getDisplayMode(TDirectDraw& dd);
extern DisplayMode displayMode;
extern bool isDisplayModeChanged;
extern IDirectDrawSurface7* surface;
extern LPDIRECTDRAWPALETTE palette;
extern PALETTEENTRY paletteEntries[256];
extern LONG width;
extern LONG height;
extern DDPIXELFORMAT pixelFormat;
extern IReleaseNotifier releaseNotifier;
}