Nuked DirectDraw renderer

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@310 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
mudlord 2008-01-17 05:58:17 +00:00
parent 5b243daf86
commit 635ff74f10
9 changed files with 183 additions and 271 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="8.00"
Name="VisualBoyAdvance"
ProjectGUID="{6D4C5EC8-933F-4C05-A1BF-498E658576DF}"
RootNamespace="VBA"
@ -129,6 +129,128 @@
ExcludedFromBuild="true"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)_temp"
ConfigurationType="1"
UseOfMFC="1"
UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
ManagedExtensions="0"
BuildLogFile="$(IntDir)\$(ProjectName)_BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D_ST_MODEL&#x0D;&#x0A;/D_SECURE_SCL=0&#x0D;&#x0A;/Zc:forScope-&#x0D;&#x0A;/MP"
Optimization="2"
InlineFunctionExpansion="2"
FavorSizeOrSpeed="1"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\dependencies\zlib;..\dependencies\libpng\src;&quot;..\dependencies\File_Extractor-0.4.3\fex&quot;;..\dependencies\cximage;..\dependencies\msvc"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;MMX;BKPT_SUPPORT;GBA_LOGGING;FINAL_VERSION"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="1"
FloatingPointModel="2"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG "
Culture="1033"
AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
ExcludedFromBuild="true"
/>
<Tool
Name="VCLinkerTool"
RegisterOutput="false"
IgnoreImportLibrary="false"
AdditionalDependencies="nafxcw.lib LIBCMT.lib dinput8.lib winmm.lib dxguid.lib ddraw.lib Dsound.lib"
ShowProgress="0"
OutputFile="$(OutDir)\VisualBoyAdvance.exe"
Version=""
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
GenerateManifest="true"
AdditionalManifestDependencies="type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;x86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="nafxcw.lib;LIBCMT.lib"
GenerateDebugInformation="false"
AssemblyDebug="2"
GenerateMapFile="false"
MapExports="false"
SubSystem="2"
OptimizeReferences="0"
EnableCOMDATFolding="0"
OptimizeForWindows98="1"
LinkTimeCodeGeneration="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
ExcludedFromBuild="true"
RelativePath=""
UnloadBeforeCopy="false"
RegisterOutput="false"
VirtualDirectoryName=""
/>
<Tool
Name="VCPostBuildEventTool"
ExcludedFromBuild="true"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
@ -238,128 +360,6 @@
ExcludedFromBuild="true"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)_temp"
ConfigurationType="1"
UseOfMFC="1"
UseOfATL="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
ManagedExtensions="0"
BuildLogFile="$(IntDir)\$(ProjectName)_BuildLog.htm"
>
<Tool
Name="VCPreBuildEventTool"
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D_ST_MODEL&#x0D;&#x0A;/D_SECURE_SCL=0&#x0D;&#x0A;/Zc:forScope-&#x0D;&#x0A;/MP"
Optimization="2"
InlineFunctionExpansion="2"
FavorSizeOrSpeed="1"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\dependencies\zlib;..\dependencies\libpng\src;&quot;..\dependencies\File_Extractor-0.4.3\fex&quot;;..\dependencies\cximage;..\dependencies\msvc"
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;MMX;BKPT_SUPPORT;GBA_LOGGING;FINAL_VERSION"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="1"
FloatingPointModel="2"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
AdditionalIncludeDirectories=""
/>
<Tool
Name="VCPreLinkEventTool"
ExcludedFromBuild="true"
/>
<Tool
Name="VCLinkerTool"
RegisterOutput="false"
IgnoreImportLibrary="false"
AdditionalDependencies="nafxcw.lib LIBCMT.lib dinput8.lib winmm.lib dxguid.lib ddraw.lib Dsound.lib"
ShowProgress="0"
OutputFile="$(OutDir)\VisualBoyAdvance.exe"
Version=""
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""
GenerateManifest="true"
AdditionalManifestDependencies="type=&apos;win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;x86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="nafxcw.lib;LIBCMT.lib"
GenerateDebugInformation="false"
AssemblyDebug="2"
GenerateMapFile="false"
MapExports="false"
SubSystem="2"
OptimizeReferences="0"
EnableCOMDATFolding="0"
OptimizeForWindows98="1"
LinkTimeCodeGeneration="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
ExcludedFromBuild="true"
RelativePath=""
UnloadBeforeCopy="false"
RegisterOutput="false"
VirtualDirectoryName=""
/>
<Tool
Name="VCPostBuildEventTool"
ExcludedFromBuild="true"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
@ -528,6 +528,16 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputFileName)..."
CommandLine="nasm -d__DJGPP__ -O1 -fwin32 -Xvc -o&quot;$(IntDir)\$(InputName).obj&quot; -- &quot;$(InputPath)&quot;&#x0D;&#x0A;"
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
@ -539,16 +549,6 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Assembling $(InputFileName)..."
CommandLine="nasm -d__DJGPP__ -O1 -fwin32 -Xvc -o&quot;$(IntDir)\$(InputName).obj&quot; -- &quot;$(InputPath)&quot;&#x0D;&#x0A;"
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
@ -1129,10 +1129,6 @@
RelativePath=".\src\win32\Direct3D.cpp"
>
</File>
<File
RelativePath=".\src\win32\DirectDraw.cpp"
>
</File>
<File
RelativePath=".\src\win32\DirectInput.cpp"
>
@ -1153,7 +1149,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@ -1161,7 +1157,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@ -1862,14 +1858,6 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
@ -1880,6 +1868,14 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
@ -1902,14 +1898,6 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
@ -1920,6 +1908,14 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
@ -1942,14 +1938,6 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
@ -1960,6 +1948,14 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
@ -1982,14 +1978,6 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
@ -2000,6 +1988,14 @@
Outputs="&quot;$(IntDir)\$(InputName).obj&quot;"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
@ -2021,7 +2017,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@ -2029,7 +2025,7 @@
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@ -2067,6 +2063,10 @@
</File>
</Filter>
</Filter>
<File
RelativePath=".\src\win32\resource"
>
</File>
</Files>
<Globals>
<Global

View File

@ -22,9 +22,8 @@
#include <memory.h>
enum DISPLAY_TYPE {
DIRECT_DRAW = 0,
DIRECT_3D = 1,
OPENGL = 2
DIRECT_3D = 0,
OPENGL = 1
};
class IDisplay {

View File

@ -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)

View File

@ -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();

View File

@ -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;

View File

@ -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()
{

View File

@ -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

View File

@ -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;

View File

@ -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