Skip to content

Commit

Permalink
DirectDraw compile switch
Browse files Browse the repository at this point in the history
This puts all Directdraw-related code into a compile-time switch
'DIRECTDRAW_DEFINED'. To enable DirectDraw, you need to define this in
the snes9xw project file, and add a reference to drraw.lib in it too.
  • Loading branch information
bonimy committed Apr 2, 2017
1 parent 800a7e8 commit aeba008
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 19 deletions.
4 changes: 2 additions & 2 deletions win32/CDirectDraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@
Nintendo Co., Limited and its subsidiary companies.
***********************************************************************************/



#if DIRECTDRAW_DEFINED

// CDirectDraw.cpp: implementation of the CDirectDraw class.
//
Expand Down Expand Up @@ -897,3 +896,4 @@ void CDirectDraw::EnumModes(std::vector<dMode> *modeVector)
lpDD->EnumDisplayModes(DDEDM_REFRESHRATES,NULL,(void *)modeVector,(LPDDENUMMODESCALLBACK)EnumModesCallback);
}

#endif
4 changes: 4 additions & 0 deletions win32/CDirectDraw.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
#pragma once
#endif // _MSC_VER >= 1000

#if DIRECTDRAW_DEFINED

class CDirectDraw: public IS9xDisplayOutput
{
public:
Expand Down Expand Up @@ -247,4 +249,6 @@ class CDirectDraw: public IS9xDisplayOutput
virtual ~CDirectDraw();
};

#endif

#endif // !defined(CDIRECTDRAW_H_INCLUDED)
16 changes: 10 additions & 6 deletions win32/dxerr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
#include <algorithm>

#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
#if DIRECTDRAW_DEFINED
#include <ddraw.h>
#endif
#include <d3d9.h>
#include <dsound.h>

Expand Down Expand Up @@ -3012,6 +3014,7 @@ const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr )
// -------------------------------------------------------------
// ddraw.h error codes
// -------------------------------------------------------------
#if DIRECTDRAW_DEFINED
CHK_ERRA(DDERR_ALREADYINITIALIZED)
CHK_ERRA(DDERR_CANNOTATTACHSURFACE)
CHK_ERRA(DDERR_CANNOTDETACHSURFACE)
Expand Down Expand Up @@ -3130,6 +3133,7 @@ const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr )
CHK_ERRA(DDERR_NOMONITORINFORMATION)
CHK_ERRA(DDERR_NODRIVERSUPPORT)
CHK_ERRA(DDERR_DEVICEDOESNTOWNSURFACE)
#endif

// -------------------------------------------------------------
// dinput.h error codes
Expand Down Expand Up @@ -6392,7 +6396,7 @@ const char* WINAPI DXGetErrorStringA(_In_ HRESULT hr)
CHK_ERR_WIN32A(ERROR_IPSEC_IKE_NEG_STATUS_END)

#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)

#if DIRECTDRAW_DEFINED
// -------------------------------------------------------------
// ddraw.h error codes
// -------------------------------------------------------------
Expand Down Expand Up @@ -6514,7 +6518,7 @@ const char* WINAPI DXGetErrorStringA(_In_ HRESULT hr)
CHK_ERRA(DDERR_NOMONITORINFORMATION)
CHK_ERRA(DDERR_NODRIVERSUPPORT)
CHK_ERRA(DDERR_DEVICEDOESNTOWNSURFACE)

#endif
// -------------------------------------------------------------
// dinput.h error codes
// -------------------------------------------------------------
Expand Down Expand Up @@ -6860,7 +6864,7 @@ void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* des
// Commmented out codes are actually alises for other codes

#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)

#if DIRECTDRAW_DEFINED
// -------------------------------------------------------------
// ddraw.h error codes
// -------------------------------------------------------------
Expand Down Expand Up @@ -6982,7 +6986,7 @@ void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* des
CHK_ERR(DDERR_NOMONITORINFORMATION, "The monitor does not have EDID data.")
CHK_ERR(DDERR_NODRIVERSUPPORT, "The driver does not enumerate display mode refresh rates.")
CHK_ERR(DDERR_DEVICEDOESNTOWNSURFACE, "Surfaces created by one direct draw device cannot be used directly by another direct draw device.")

#endif

// -------------------------------------------------------------
// dinput.h error codes
Expand Down Expand Up @@ -7383,7 +7387,7 @@ void WINAPI DXGetErrorDescriptionA(_In_ HRESULT hr, _Out_cap_(count) char* desc,
// Commmented out codes are actually alises for other codes

#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)

#if DIRECTDRAW_DEFINED
// -------------------------------------------------------------
// ddraw.h error codes
// -------------------------------------------------------------
Expand Down Expand Up @@ -7505,7 +7509,7 @@ void WINAPI DXGetErrorDescriptionA(_In_ HRESULT hr, _Out_cap_(count) char* desc,
CHK_ERR(DDERR_NOMONITORINFORMATION, "The monitor does not have EDID data.")
CHK_ERR(DDERR_NODRIVERSUPPORT, "The driver does not enumerate display mode refresh rates.")
CHK_ERR(DDERR_DEVICEDOESNTOWNSURFACE, "Surfaces created by one direct draw device cannot be used directly by another direct draw device.")

#endif

// -------------------------------------------------------------
// dinput.h error codes
Expand Down
16 changes: 8 additions & 8 deletions win32/snes9xw.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>fmod.dll;fmodex.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
Expand Down Expand Up @@ -273,7 +273,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>fmod.dll;fmodex64.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
Expand Down Expand Up @@ -317,7 +317,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC>
Expand Down Expand Up @@ -363,7 +363,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC>
Expand Down Expand Up @@ -409,7 +409,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC>
Expand Down Expand Up @@ -456,7 +456,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EnableUAC>false</EnableUAC>
Expand Down Expand Up @@ -509,7 +509,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>fmod.dll;fmodex.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
Expand Down Expand Up @@ -560,7 +560,7 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;ddraw.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;winmm.lib;opengl32.lib;glu32.lib;wsock32.lib;dsound.lib;dxguid.lib;delayimp.lib;vfw32.lib;msxml2.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SuppressStartupBanner>true</SuppressStartupBanner>
<AdditionalLibraryDirectories>$(ProjectDir)..\..\FMOD\api\lib;$(ProjectDir)..\..\FMODEx_x64\api\lib;$(ProjectDir)..\..\FMODEx\api\lib;$(ProjectDir)..\i386;$(ProjectDir)..\..\zlib\lib;$(ProjectDir)..\..\libPNG\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>fmod.dll;fmodex64.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
Expand Down
6 changes: 6 additions & 0 deletions win32/wconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,11 @@ void WinRegisterConfigItems()
AddBoolC("DisplayFrameCount", Settings.DisplayMovieFrame, true, "true to show the frame count when a movie is playing");
#undef CATEGORY
#define CATEGORY "Display\\Win"
#if DIRECTDRAW_DEFINED
AddUIntC("OutputMethod", GUI.outputMethod, 1, "0=DirectDraw, 1=Direct3D, 2=OpenGL");
#else
AddUIntC("OutputMethod", GUI.outputMethod, 1, "0=Direct3D, 1=OpenGL");
#endif
AddUIntC("FilterType", GUI.Scale, 0, filterString);
AddUIntC("FilterHiRes", GUI.ScaleHiRes, 0, filterString2);
AddBoolC("BlendHiRes", GUI.BlendHiRes, true, "true to horizontally blend Hi-Res images (better transparency effect on filters that do not account for this)");
Expand All @@ -906,7 +910,9 @@ void WinRegisterConfigItems()
AddBoolC("Stretch:MaintainAspectRatio", GUI.AspectRatio, true, "prevents stretching from changing the aspect ratio");
AddUIntC("Stretch:AspectRatioBaseWidth", GUI.AspectWidth, 256, "base width for aspect ratio calculation (AR=AspectRatioBaseWidth/224), default is 256 - set to 299 for 4:3 aspect ratio");
AddBoolC("Stretch:BilinearFilter", GUI.BilinearFilter, true, "allows bilinear filtering of stretching. Depending on your video card and the window size, this may result in a lower framerate.");
#if DIRECTDRAW_DEFINED
AddBoolC("Stretch:LocalVidMem", GUI.LocalVidMem, true, "determines the location of video memory in DirectDraw mode. May increase or decrease rendering performance, depending on your setup and which filter and stretching options are active.");
#endif
AddBool("Fullscreen:Enabled", GUI.FullScreen, false);
AddUInt("Fullscreen:Width", GUI.FullscreenMode.width, 640);
AddUInt("Fullscreen:Height", GUI.FullscreenMode.height, 480);
Expand Down
18 changes: 16 additions & 2 deletions win32/win32_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@
#include "wsnes9x.h"
#include "win32_display.h"
#include "CDirect3D.h"
#if DIRECTDRAW_DEFINED
#include "CDirectDraw.h"
#endif
#include "COpenGL.h"
#include "IS9xDisplayOutput.h"

Expand All @@ -207,7 +209,9 @@

// available display output methods
CDirect3D Direct3D;
#if DIRECTDRAW_DEFINED
CDirectDraw DirectDraw;
#endif
COpenGL OpenGL;
SSurface Src = {0};
extern BYTE *ScreenBufferBlend;
Expand Down Expand Up @@ -258,9 +262,11 @@ bool WinDisplayReset(void)
case DIRECT3D:
S9xDisplayOutput = &Direct3D;
break;
#if DIRECTDRAW_DEFINED
case DIRECTDRAW:
S9xDisplayOutput = &DirectDraw;
break;
#endif
case OPENGL:
S9xDisplayOutput = &OpenGL;
break;
Expand Down Expand Up @@ -473,32 +479,35 @@ void ReduceToPath(TCHAR *filename)
// TODO: abstract the following functions in some way - only necessary for directdraw

/* DirectDraw only begin */

void SwitchToGDI()
{
#if DIRECTDRAW_DEFINED
if(GUI.outputMethod!=DIRECTDRAW)
return;

IPPU.ColorsChanged = true;
DirectDraw.lpDD->FlipToGDISurface();
GUI.FlipCounter = 0;
DirectDraw.lpDDSPrimary2->SetPalette (NULL);
#endif
}

static void ClearSurface (LPDIRECTDRAWSURFACE2 lpDDSurface)
{
#if DIRECTDRAW_DEFINED
DDBLTFX fx;

memset (&fx, 0, sizeof (fx));
fx.dwSize = sizeof (fx);

while (lpDDSurface->Blt (NULL, DirectDraw.lpDDSPrimary2, NULL, DDBLT_WAIT, NULL) == DDERR_SURFACELOST)
lpDDSurface->Restore ();
#endif
}

void UpdateBackBuffer()
{

#if DIRECTDRAW_DEFINED
if (GUI.outputMethod==DIRECTDRAW && GUI.FullScreen)
{
SwitchToGDI();
Expand Down Expand Up @@ -536,10 +545,12 @@ void UpdateBackBuffer()
if (GetMenu( GUI.hWnd) != NULL)
DrawMenuBar (GUI.hWnd);
}
#endif
}

void RestoreGUIDisplay ()
{
#if DIRECTDRAW_DEFINED
if(GUI.outputMethod!=DIRECTDRAW)
return;

Expand All @@ -555,10 +566,12 @@ void RestoreGUIDisplay ()
}
SwitchToGDI();
S9xClearPause (PAUSE_RESTORE_GUI);
#endif
}

void RestoreSNESDisplay ()
{
#if DIRECTDRAW_DEFINED
if(GUI.outputMethod!=DIRECTDRAW)
return;

Expand All @@ -569,6 +582,7 @@ void RestoreSNESDisplay ()
}

UpdateBackBuffer();
#endif
}

/* DirectDraw only end */
Expand Down
10 changes: 9 additions & 1 deletion win32/wsnes9x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,9 @@ static uint32 FrameTimings[] = {
struct sLanguages Languages[] = {
{ IDR_MENU_US,
TEXT("Failed to initialize currently selected display output!\n Try switching to a different output method in the display settings."),
#if DIRECTDRAW_DEFINED
TEXT("DirectDraw failed to set the selected display mode!"),
#endif
TEXT("DirectSound failed to initialize; no sound will be played."),
TEXT("These settings won't take effect until you restart the emulator."),
TEXT("The frame timer failed to initialize, please do NOT select the automatic framerate option or Snes9X will crash!")}
Expand Down Expand Up @@ -1386,7 +1388,11 @@ int HandleKeyMessage(WPARAM wParam, LPARAM lParam)
switch (wParam)
{
case VK_ESCAPE:
if(GUI.outputMethod!=DIRECTDRAW && GUI.FullScreen && !GUI.EmulateFullscreen)
if(
#if DIRECTDRAW_DEFINED
GUI.outputMethod!=DIRECTDRAW &&
#endif
GUI.FullScreen && !GUI.EmulateFullscreen)
ToggleFullScreen();
else
if (GetMenu (GUI.hWnd) == NULL)
Expand Down Expand Up @@ -7327,7 +7333,9 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)

EnableWindow(GetDlgItem(hDlg, IDC_ASPECT), GUI.Stretch);

#if DIRECTDRAW_DEFINED
SendDlgItemMessage(hDlg,IDC_OUTPUTMETHOD,CB_ADDSTRING,0,(LPARAM)TEXT("DirectDraw"));
#endif
SendDlgItemMessage(hDlg,IDC_OUTPUTMETHOD,CB_ADDSTRING,0,(LPARAM)TEXT("Direct3D"));
SendDlgItemMessage(hDlg,IDC_OUTPUTMETHOD,CB_ADDSTRING,0,(LPARAM)TEXT("OpenGL"));
SendDlgItemMessage(hDlg,IDC_OUTPUTMETHOD,CB_SETCURSEL,(WPARAM)GUI.outputMethod,0);
Expand Down
8 changes: 8 additions & 0 deletions win32/wsnes9x.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,12 @@ enum RenderFilter{
};

enum OutputMethod {
#if DIRECTDRAW_DEFINED
DIRECTDRAW = 0,
DIRECT3D,
#else
DIRECT3D = 0,
#endif
OPENGL
};

Expand Down Expand Up @@ -330,7 +334,9 @@ struct sGUI {
bool EmulateFullscreen;
bool EmulatedFullscreen;
bool BilinearFilter;
#if DIRECTDRAW_DEFINED
bool LocalVidMem;
#endif
bool Vsync;
bool shaderEnabled;
TCHAR D3DshaderFileName[MAX_PATH];
Expand Down Expand Up @@ -434,7 +440,9 @@ struct sGUI {
struct sLanguages {
int idMenu;
TCHAR *errInitDD;
#if DIRECTDRAW_DEFINED
TCHAR *errModeDD;
#endif
TCHAR *errInitDS;
TCHAR *ApplyNeedRestart;
TCHAR *errFrameTimer;
Expand Down

0 comments on commit aeba008

Please sign in to comment.