diff --git a/VBA.vcproj b/VBA.vcproj
index e5b867cb..c3f20f2e 100644
--- a/VBA.vcproj
+++ b/VBA.vcproj
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
@@ -1153,7 +1149,7 @@
/>
-
-
-
@@ -1880,6 +1868,14 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
+
+
+
-
-
-
@@ -1920,6 +1908,14 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
+
+
+
-
-
-
@@ -1960,6 +1948,14 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
+
+
+
-
-
-
@@ -2000,6 +1988,14 @@
Outputs=""$(IntDir)\$(InputName).obj""
/>
+
+
+
+
+
enum DISPLAY_TYPE {
- DIRECT_DRAW = 0,
- DIRECT_3D = 1,
- OPENGL = 2
+ DIRECT_3D = 0,
+ OPENGL = 1
};
class IDisplay {
diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp
index 98c852f7..f9f71370 100644
--- a/src/win32/MainWnd.cpp
+++ b/src/win32/MainWnd.cpp
@@ -155,18 +155,12 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_DISABLESFX, OnUpdateOptionsVideoDisablesfx)
ON_COMMAND(ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT, OnOptionsVideoFullscreenstretchtofit)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT, OnUpdateOptionsVideoFullscreenstretchtofit)
- ON_COMMAND(ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECTDRAW, OnOptionsVideoRendermethodDirectdraw)
- ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECTDRAW, OnUpdateOptionsVideoRendermethodDirectdraw)
ON_COMMAND(ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D, OnOptionsVideoRendermethodDirect3d)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D, OnUpdateOptionsVideoRendermethodDirect3d)
ON_COMMAND(ID_OPTIONS_VIDEO_RENDERMETHOD_OPENGL, OnOptionsVideoRendermethodOpengl)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDERMETHOD_OPENGL, OnUpdateOptionsVideoRendermethodOpengl)
ON_COMMAND(ID_OPTIONS_VIDEO_TRIPLEBUFFERING, OnOptionsVideoTriplebuffering)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_TRIPLEBUFFERING, OnUpdateOptionsVideoTriplebuffering)
- ON_COMMAND(ID_OPTIONS_VIDEO_DDRAWEMULATIONONLY, OnOptionsVideoDdrawemulationonly)
- ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_DDRAWEMULATIONONLY, OnUpdateOptionsVideoDdrawemulationonly)
- ON_COMMAND(ID_OPTIONS_VIDEO_DDRAWUSEVIDEOMEMORY, OnOptionsVideoDdrawusevideomemory)
- ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_DDRAWUSEVIDEOMEMORY, OnUpdateOptionsVideoDdrawusevideomemory)
ON_COMMAND(ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DNOFILTER, OnOptionsVideoRenderoptionsD3dnofilter)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DNOFILTER, OnUpdateOptionsVideoRenderoptionsD3dnofilter)
ON_COMMAND(ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DBILINEAR, OnOptionsVideoRenderoptionsD3dbilinear)
diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h
index a2184bac..b9d24152 100644
--- a/src/win32/MainWnd.h
+++ b/src/win32/MainWnd.h
@@ -186,10 +186,6 @@ class MainWnd : public CWnd
afx_msg void OnUpdateOptionsVideoRendermethodOpengl(CCmdUI* pCmdUI);
afx_msg void OnOptionsVideoTriplebuffering();
afx_msg void OnUpdateOptionsVideoTriplebuffering(CCmdUI* pCmdUI);
- afx_msg void OnOptionsVideoDdrawemulationonly();
- afx_msg void OnUpdateOptionsVideoDdrawemulationonly(CCmdUI* pCmdUI);
- afx_msg void OnOptionsVideoDdrawusevideomemory();
- afx_msg void OnUpdateOptionsVideoDdrawusevideomemory(CCmdUI* pCmdUI);
afx_msg void OnOptionsVideoRenderoptionsD3dnofilter();
afx_msg void OnUpdateOptionsVideoRenderoptionsD3dnofilter(CCmdUI* pCmdUI);
afx_msg void OnOptionsVideoRenderoptionsD3dbilinear();
diff --git a/src/win32/MainWndFile.cpp b/src/win32/MainWndFile.cpp
index 6bcba9e2..bf210c1f 100644
--- a/src/win32/MainWndFile.cpp
+++ b/src/win32/MainWndFile.cpp
@@ -708,7 +708,7 @@ void MainWnd::OnFileTogglemenu()
return;
}
- if( theApp.renderMethod != DIRECT_DRAW ) {
+ if(( theApp.renderMethod = DIRECT_3D ) | (theApp.renderMethod = OPENGL )) {
// display API does not support GDI objects in fullscreen
theApp.updateWindowSize( theApp.lastWindowed );
return;
diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp
index b5b471c3..4fe61ccb 100644
--- a/src/win32/MainWndOptions.cpp
+++ b/src/win32/MainWndOptions.cpp
@@ -305,9 +305,6 @@ void MainWnd::OnUpdateOptionsVideoFullscreen1280x1024(CCmdUI *pCmdUI)
BOOL MainWnd::OnOptionVideoSize(UINT nID)
{
theApp.updateVideoSize(nID);
- if( theApp.renderMethod == DIRECT_DRAW ) {
- theApp.m_pMainWnd->PostMessage(VBA_CONFIRM_MODE);
- }
return TRUE;
}
@@ -370,9 +367,6 @@ void MainWnd::OnOptionsVideoFullscreen()
regSetDwordValue( "defaultVideoDriver", TRUE );
}
theApp.updateVideoSize( ID_OPTIONS_VIDEO_FULLSCREEN );
- if( theApp.renderMethod == DIRECT_DRAW ) {
- theApp.m_pMainWnd->PostMessage(VBA_CONFIRM_MODE);
- }
}
}
theApp.winAccelMgr.UpdateMenu(theApp.menu);
@@ -438,17 +432,6 @@ void MainWnd::OnUpdateVideoLayer(CCmdUI *pCmdUI)
}
}
-void MainWnd::OnOptionsVideoRendermethodDirectdraw()
-{
- theApp.renderMethod = DIRECT_DRAW;
- theApp.updateRenderMethod(false);
- theApp.winAccelMgr.UpdateMenu(theApp.menu);
-}
-
-void MainWnd::OnUpdateOptionsVideoRendermethodDirectdraw(CCmdUI* pCmdUI)
-{
- pCmdUI->SetCheck(theApp.renderMethod == DIRECT_DRAW);
-}
void MainWnd::OnOptionsVideoRendermethodDirect3d()
{
@@ -501,34 +484,6 @@ void MainWnd::OnUpdateOptionsVideoTriplebuffering(CCmdUI* pCmdUI)
pCmdUI->SetCheck(theApp.tripleBuffering);
}
-void MainWnd::OnOptionsVideoDdrawemulationonly()
-{
- theApp.ddrawEmulationOnly = !theApp.ddrawEmulationOnly;
- if( theApp.display ) {
- theApp.display->setOption( _T("ddrawEmulationOnly"), theApp.ddrawEmulationOnly );
- }
-}
-
-
-void MainWnd::OnUpdateOptionsVideoDdrawemulationonly(CCmdUI* pCmdUI)
-{
- pCmdUI->SetCheck(theApp.ddrawEmulationOnly);
-}
-
-
-void MainWnd::OnOptionsVideoDdrawusevideomemory()
-{
- theApp.ddrawUseVideoMemory = !theApp.ddrawUseVideoMemory;
- if( theApp.display ) {
- theApp.display->setOption( _T("ddrawUseVideoMemory"), theApp.ddrawUseVideoMemory );
- }
-}
-
-
-void MainWnd::OnUpdateOptionsVideoDdrawusevideomemory(CCmdUI* pCmdUI)
-{
- pCmdUI->SetCheck(theApp.ddrawUseVideoMemory);
-}
void MainWnd::OnOptionsVideoRenderoptionsD3dnofilter()
{
diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp
index 1447c3ee..9dbd1742 100644
--- a/src/win32/VBA.cpp
+++ b/src/win32/VBA.cpp
@@ -278,17 +278,13 @@ VBA::VBA()
vsync = false;
changingVideoSize = false;
pVideoDriverGUID = NULL;
- renderMethod = DIRECT_DRAW;
+ renderMethod = DIRECT_3D;
audioAPI = DIRECTSOUND;
#ifndef NO_OAL
oalDevice = NULL;
oalBufferCount = 5;
#endif
iconic = false;
- ddrawEmulationOnly = false;
- ddrawUsingEmulationOnly = false;
- ddrawDebug = false;
- ddrawUseVideoMemory = false;
#ifndef NO_D3D
d3dFilter = 0;
d3dMotionBlur = false;
@@ -506,10 +502,6 @@ BOOL VBA::InitInstance()
"debug",
0,
MakeInstanceFilename("VBA.ini"));
- ddrawDebug = GetPrivateProfileInt("config",
- "ddrawDebug",
- 0,
- MakeInstanceFilename("VBA.ini")) ? true : false;
wndClass = AfxRegisterWndClass(0, LoadCursor(IDC_ARROW), (HBRUSH)GetStockObject(BLACK_BRUSH), LoadIcon(IDI_MAINICON));
@@ -954,7 +946,7 @@ void VBA::updateMenuBar()
popup = NULL;
}
- if( ( renderMethod != DIRECT_DRAW ) && ( videoOption >= VIDEO_320x240 ) ) {
+ if( ( videoOption >= VIDEO_320x240 ) ) {
return;
}
@@ -1456,16 +1448,13 @@ void VBA::loadSettings()
videoOption = 0;
}
- renderMethod = (DISPLAY_TYPE)regQueryDwordValue("renderMethod", DIRECT_DRAW);
- if( ( renderMethod != DIRECT_DRAW )
+ renderMethod = (DISPLAY_TYPE)regQueryDwordValue("renderMethod", DIRECT_3D);
+ if( ( renderMethod != DIRECT_3D )
#ifndef NO_OGL
&& ( renderMethod != OPENGL )
-#endif
-#ifndef NO_D3D
- && ( renderMethod != DIRECT_3D )
#endif
) {
- renderMethod = DIRECT_DRAW;
+ renderMethod = DIRECT_3D;
}
audioAPI = (AUDIO_API)regQueryDwordValue( "audioAPI", DIRECTSOUND );
@@ -1525,8 +1514,6 @@ void VBA::loadSettings()
if(soundInterpolation < 0 || soundInterpolation > 1)
soundInterpolation = 0;
- ddrawEmulationOnly = regQueryDwordValue("ddrawEmulationOnly", false) ? true : false;
- ddrawUseVideoMemory = regQueryDwordValue("ddrawUseVideoMemory", true) ? true : false;
tripleBuffering = regQueryDwordValue("tripleBuffering", false) ? true : false;
#ifndef NO_D3D
@@ -1842,9 +1829,7 @@ void VBA::updateWindowSize(int value)
}
input->checkKeys();
- if( renderMethod == DIRECT_DRAW ) {
- updateMenuBar();
- }
+
changingVideoSize = FALSE;
updateWindowSize(videoOption);
return;
@@ -2116,7 +2101,7 @@ bool VBA::updateRenderMethod(bool force)
if( !updateRenderMethod0( force ) ) {
// fall back to safe configuration
- renderMethod = DIRECT_DRAW;
+ renderMethod = DIRECT_3D;
fsAdapter = 0;
videoOption = VIDEO_1X;
ret = updateRenderMethod( true );
@@ -2167,12 +2152,6 @@ bool VBA::updateRenderMethod0(bool force)
display = newDirect3DDisplay();
break;
#endif
- case DIRECT_DRAW:
- default:
- pVideoDriverGUID = NULL;
- ZeroMemory( &videoDriverGUID, sizeof( GUID ) );
- display = newDirectDrawDisplay();
- break;
}
if( preInitialize() ) {
@@ -2572,9 +2551,6 @@ void VBA::saveSettings()
regSetDwordValue("soundVolume", soundVolume);
regSetDwordValue("soundInterpolation", soundInterpolation);
-
- regSetDwordValue("ddrawEmulationOnly", ddrawEmulationOnly);
- regSetDwordValue("ddrawUseVideoMemory", ddrawUseVideoMemory);
regSetDwordValue("tripleBuffering", tripleBuffering);
#ifndef NO_D3D
diff --git a/src/win32/VBA.h b/src/win32/VBA.h
index d5f4884d..0a346f73 100644
--- a/src/win32/VBA.h
+++ b/src/win32/VBA.h
@@ -159,10 +159,6 @@ class VBA : public CWinApp
int oalBufferCount;
#endif
bool iconic;
- bool ddrawEmulationOnly;
- bool ddrawUsingEmulationOnly;
- bool ddrawDebug;
- bool ddrawUseVideoMemory;
#ifndef NO_D3D
int d3dFilter;
bool d3dMotionBlur;
diff --git a/src/win32/VBA.rc b/src/win32/VBA.rc
index d8bf0135..d7b073ef 100644
--- a/src/win32/VBA.rc
+++ b/src/win32/VBA.rc
@@ -1666,10 +1666,6 @@ BEGIN
BEGIN
POPUP "Render API"
BEGIN
- MENUITEM "Direct&Draw", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECTDRAW
- MENUITEM " Emulation only", ID_OPTIONS_VIDEO_DDRAWEMULATIONONLY
- MENUITEM " Use &Video Memory", ID_OPTIONS_VIDEO_DDRAWUSEVIDEOMEMORY
- MENUITEM SEPARATOR
MENUITEM "Direct&3D", ID_OPTIONS_VIDEO_RENDERMETHOD_DIRECT3D
MENUITEM " Filter: Nearest", ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DNOFILTER
MENUITEM " Filter: Bilinear", ID_OPTIONS_VIDEO_RENDEROPTIONS_D3DBILINEAR