mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
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.
32 lines
604 B
C++
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;
|
|
}
|