Project cleanups, add _CRT_SECURE_NO_WARNINGS to reduce absurdly high
warning count. Fix DirectDraw initializer to check for 1024x768 and 1280x1024, they were grayed out. Default resolutions set to 60hz and DirectDraw now obeys fsFrequency setting.
This commit is contained in:
parent
bd4c955c63
commit
c5049e7a5d
|
@ -52,7 +52,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;DEV_VERSION;BKPT_SUPPORT;MMX"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;DEV_VERSION;BKPT_SUPPORT;MMX;_CRT_SECURE_NO_WARNINGS"
|
||||
StringPooling="false"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
|
@ -165,7 +165,7 @@
|
|||
OmitFramePointers="false"
|
||||
EnableFiberSafeOptimizations="false"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;FINAL_VERSION;MMX"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;FINAL_VERSION;MMX;_CRT_SECURE_NO_WARNINGS"
|
||||
IgnoreStandardIncludePath="false"
|
||||
GeneratePreprocessedFile="0"
|
||||
KeepComments="false"
|
||||
|
@ -307,13 +307,13 @@
|
|||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;FINAL_VERSION;MMX"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;FINAL_VERSION;MMX;_CRT_SECURE_NO_WARNINGS"
|
||||
IgnoreStandardIncludePath="false"
|
||||
GeneratePreprocessedFile="0"
|
||||
KeepComments="false"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="0"
|
||||
ExceptionHandling="1"
|
||||
BasicRuntimeChecks="0"
|
||||
SmallerTypeCheck="false"
|
||||
RuntimeLibrary="0"
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
|
@ -106,7 +106,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
|
|
|
@ -1592,8 +1592,8 @@ BEGIN
|
|||
MENUITEM "320x240x16", ID_OPTIONS_VIDEO_FULLSCREEN320X240
|
||||
MENUITEM "640x480x16", ID_OPTIONS_VIDEO_FULLSCREEN640X480
|
||||
MENUITEM "800x600x16", ID_OPTIONS_VIDEO_FULLSCREEN800X600
|
||||
MENUITEM "1024x768x32", ID_OPTIONS_VIDEO_FULLSCREEN1024X768
|
||||
MENUITEM "1280x1024x32", ID_OPTIONS_VIDEO_FULLSCREEN1280X1024
|
||||
MENUITEM "1024x768x16", ID_OPTIONS_VIDEO_FULLSCREEN1024X768
|
||||
MENUITEM "1280x1024x16", ID_OPTIONS_VIDEO_FULLSCREEN1280X1024
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Max Scale...", ID_OPTIONS_VIDEO_FULLSCREENMAXSCALE
|
||||
MENUITEM "Stretch to &fit", ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT
|
||||
|
|
|
@ -3896,11 +3896,9 @@ _hq4x_16:
|
|||
add edi,ebx
|
||||
add edi,ebx
|
||||
mov ebx, [ebp+Xres] ; added, bug - need to add to destination offset
|
||||
shl ebx, 1
|
||||
shl ebx, 3
|
||||
sub edi, ebx
|
||||
sub edi, ebx
|
||||
sub edi, ebx
|
||||
sub edi, ebx
|
||||
shr ebx, 2
|
||||
dec dword[linesleft]
|
||||
jz .fin
|
||||
add ebx, [ebp+offset];
|
||||
|
|
|
@ -378,6 +378,8 @@ bool Direct3DDisplay::initialize()
|
|||
theApp.mode320Available = false;
|
||||
theApp.mode640Available = false;
|
||||
theApp.mode800Available = false;
|
||||
theApp.mode1024Available = false;
|
||||
theApp.mode1280Available = false;
|
||||
|
||||
nModes = pD3D->GetAdapterModeCount(theApp.fsAdapter, D3DFMT_R5G6B5);
|
||||
for (i = 0; i<nModes; i++)
|
||||
|
@ -390,6 +392,11 @@ bool Direct3DDisplay::initialize()
|
|||
theApp.mode640Available = true;
|
||||
if ( (dm.Width == 800) && (dm.Height == 600) )
|
||||
theApp.mode800Available = true;
|
||||
if ( (dm.Width == 1024) && (dm.Height == 768) )
|
||||
theApp.mode1024Available = true;
|
||||
if ( (dm.Width == 1280) && (dm.Height == 1024) )
|
||||
theApp.mode1280Available = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -105,6 +105,18 @@ static HRESULT WINAPI checkModesAvailable(LPDDSURFACEDESC2 surf, LPVOID lpContex
|
|||
surf->ddpfPixelFormat.dwRGBBitCount == 16) {
|
||||
theApp.mode800Available = TRUE;
|
||||
}
|
||||
if(surf->dwWidth == 1024 &&
|
||||
surf->dwHeight == 768 &&
|
||||
surf->ddpfPixelFormat.dwRGBBitCount == 16) {
|
||||
theApp.mode1024Available = TRUE;
|
||||
}
|
||||
if(surf->dwWidth == 1280 &&
|
||||
surf->dwHeight == 1024 &&
|
||||
surf->ddpfPixelFormat.dwRGBBitCount == 16) {
|
||||
theApp.mode1280Available = TRUE;
|
||||
}
|
||||
|
||||
|
||||
return DDENUMRET_OK;
|
||||
}
|
||||
|
||||
|
@ -346,6 +358,8 @@ bool DirectDrawDisplay::initialize()
|
|||
theApp.mode320Available = false;
|
||||
theApp.mode640Available = false;
|
||||
theApp.mode800Available = false;
|
||||
theApp.mode1024Available = false;
|
||||
theApp.mode1280Available = false;
|
||||
// check for available fullscreen modes
|
||||
pDirectDraw->EnumDisplayModes(DDEDM_STANDARDVGAMODES, NULL, NULL,
|
||||
checkModesAvailable);
|
||||
|
@ -371,7 +385,7 @@ bool DirectDrawDisplay::initialize()
|
|||
hret = pDirectDraw->SetDisplayMode(theApp.fsWidth,
|
||||
theApp.fsHeight,
|
||||
theApp.fsColorDepth,
|
||||
60,
|
||||
theApp.fsFrequency,
|
||||
0);
|
||||
if(hret != DD_OK) {
|
||||
winlog("Error SetDisplayMode %08x\n", hret);
|
||||
|
|
|
@ -1286,7 +1286,7 @@ void VBA::loadSettings()
|
|||
fsWidth = regQueryDwordValue("fsWidth", 0);
|
||||
fsHeight = regQueryDwordValue("fsHeight", 0);
|
||||
fsColorDepth = regQueryDwordValue("fsColorDepth", 0);
|
||||
fsFrequency = regQueryDwordValue("fsFrequency", 0);
|
||||
fsFrequency = regQueryDwordValue("fsFrequency", 60);
|
||||
fsAdapter = regQueryDwordValue("fsAdapter", 0);
|
||||
|
||||
if(videoOption == VIDEO_OTHER)
|
||||
|
@ -1421,27 +1421,32 @@ void VBA::loadSettings()
|
|||
fsWidth = 320;
|
||||
fsHeight = 240;
|
||||
fsColorDepth = 16;
|
||||
fsFrequency = 60;
|
||||
break;
|
||||
case VIDEO_640x480:
|
||||
fsWidth = 640;
|
||||
fsHeight = 480;
|
||||
fsColorDepth = 16;
|
||||
break;
|
||||
fsFrequency = 60;
|
||||
break;
|
||||
case VIDEO_800x600:
|
||||
fsWidth = 800;
|
||||
fsHeight = 600;
|
||||
fsColorDepth = 16;
|
||||
break;
|
||||
fsFrequency = 60;
|
||||
break;
|
||||
case VIDEO_1024x768:
|
||||
fsWidth = 1024;
|
||||
fsHeight = 768;
|
||||
fsColorDepth = 32;
|
||||
break;
|
||||
fsColorDepth = 16;
|
||||
fsFrequency = 60;
|
||||
break;
|
||||
case VIDEO_1280x1024:
|
||||
fsWidth = 1280;
|
||||
fsHeight = 1024;
|
||||
fsColorDepth = 32;
|
||||
break;
|
||||
fsColorDepth = 16;
|
||||
fsFrequency = 60;
|
||||
break;
|
||||
}
|
||||
|
||||
winGbBorderOn = regQueryDwordValue("borderOn", 0);
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
|
@ -103,7 +103,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
|
|
Loading…
Reference in New Issue