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"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
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"
|
StringPooling="false"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
OmitFramePointers="false"
|
OmitFramePointers="false"
|
||||||
EnableFiberSafeOptimizations="false"
|
EnableFiberSafeOptimizations="false"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
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"
|
IgnoreStandardIncludePath="false"
|
||||||
GeneratePreprocessedFile="0"
|
GeneratePreprocessedFile="0"
|
||||||
KeepComments="false"
|
KeepComments="false"
|
||||||
|
@ -307,13 +307,13 @@
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib";"$(SolutionDir)libpng""
|
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"
|
IgnoreStandardIncludePath="false"
|
||||||
GeneratePreprocessedFile="0"
|
GeneratePreprocessedFile="0"
|
||||||
KeepComments="false"
|
KeepComments="false"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
MinimalRebuild="false"
|
MinimalRebuild="false"
|
||||||
ExceptionHandling="0"
|
ExceptionHandling="1"
|
||||||
BasicRuntimeChecks="0"
|
BasicRuntimeChecks="0"
|
||||||
SmallerTypeCheck="false"
|
SmallerTypeCheck="false"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)zlib""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)zlib""
|
AdditionalIncludeDirectories=""$(SolutionDir)zlib""
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
|
|
|
@ -1592,8 +1592,8 @@ BEGIN
|
||||||
MENUITEM "320x240x16", ID_OPTIONS_VIDEO_FULLSCREEN320X240
|
MENUITEM "320x240x16", ID_OPTIONS_VIDEO_FULLSCREEN320X240
|
||||||
MENUITEM "640x480x16", ID_OPTIONS_VIDEO_FULLSCREEN640X480
|
MENUITEM "640x480x16", ID_OPTIONS_VIDEO_FULLSCREEN640X480
|
||||||
MENUITEM "800x600x16", ID_OPTIONS_VIDEO_FULLSCREEN800X600
|
MENUITEM "800x600x16", ID_OPTIONS_VIDEO_FULLSCREEN800X600
|
||||||
MENUITEM "1024x768x32", ID_OPTIONS_VIDEO_FULLSCREEN1024X768
|
MENUITEM "1024x768x16", ID_OPTIONS_VIDEO_FULLSCREEN1024X768
|
||||||
MENUITEM "1280x1024x32", ID_OPTIONS_VIDEO_FULLSCREEN1280X1024
|
MENUITEM "1280x1024x16", ID_OPTIONS_VIDEO_FULLSCREEN1280X1024
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Max Scale...", ID_OPTIONS_VIDEO_FULLSCREENMAXSCALE
|
MENUITEM "&Max Scale...", ID_OPTIONS_VIDEO_FULLSCREENMAXSCALE
|
||||||
MENUITEM "Stretch to &fit", ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT
|
MENUITEM "Stretch to &fit", ID_OPTIONS_VIDEO_FULLSCREENSTRETCHTOFIT
|
||||||
|
|
|
@ -3896,11 +3896,9 @@ _hq4x_16:
|
||||||
add edi,ebx
|
add edi,ebx
|
||||||
add edi,ebx
|
add edi,ebx
|
||||||
mov ebx, [ebp+Xres] ; added, bug - need to add to destination offset
|
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
|
sub edi, ebx
|
||||||
|
shr ebx, 2
|
||||||
dec dword[linesleft]
|
dec dword[linesleft]
|
||||||
jz .fin
|
jz .fin
|
||||||
add ebx, [ebp+offset];
|
add ebx, [ebp+offset];
|
||||||
|
|
|
@ -378,6 +378,8 @@ bool Direct3DDisplay::initialize()
|
||||||
theApp.mode320Available = false;
|
theApp.mode320Available = false;
|
||||||
theApp.mode640Available = false;
|
theApp.mode640Available = false;
|
||||||
theApp.mode800Available = false;
|
theApp.mode800Available = false;
|
||||||
|
theApp.mode1024Available = false;
|
||||||
|
theApp.mode1280Available = false;
|
||||||
|
|
||||||
nModes = pD3D->GetAdapterModeCount(theApp.fsAdapter, D3DFMT_R5G6B5);
|
nModes = pD3D->GetAdapterModeCount(theApp.fsAdapter, D3DFMT_R5G6B5);
|
||||||
for (i = 0; i<nModes; i++)
|
for (i = 0; i<nModes; i++)
|
||||||
|
@ -390,6 +392,11 @@ bool Direct3DDisplay::initialize()
|
||||||
theApp.mode640Available = true;
|
theApp.mode640Available = true;
|
||||||
if ( (dm.Width == 800) && (dm.Height == 600) )
|
if ( (dm.Width == 800) && (dm.Height == 600) )
|
||||||
theApp.mode800Available = true;
|
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) {
|
surf->ddpfPixelFormat.dwRGBBitCount == 16) {
|
||||||
theApp.mode800Available = TRUE;
|
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;
|
return DDENUMRET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,6 +358,8 @@ bool DirectDrawDisplay::initialize()
|
||||||
theApp.mode320Available = false;
|
theApp.mode320Available = false;
|
||||||
theApp.mode640Available = false;
|
theApp.mode640Available = false;
|
||||||
theApp.mode800Available = false;
|
theApp.mode800Available = false;
|
||||||
|
theApp.mode1024Available = false;
|
||||||
|
theApp.mode1280Available = false;
|
||||||
// check for available fullscreen modes
|
// check for available fullscreen modes
|
||||||
pDirectDraw->EnumDisplayModes(DDEDM_STANDARDVGAMODES, NULL, NULL,
|
pDirectDraw->EnumDisplayModes(DDEDM_STANDARDVGAMODES, NULL, NULL,
|
||||||
checkModesAvailable);
|
checkModesAvailable);
|
||||||
|
@ -371,7 +385,7 @@ bool DirectDrawDisplay::initialize()
|
||||||
hret = pDirectDraw->SetDisplayMode(theApp.fsWidth,
|
hret = pDirectDraw->SetDisplayMode(theApp.fsWidth,
|
||||||
theApp.fsHeight,
|
theApp.fsHeight,
|
||||||
theApp.fsColorDepth,
|
theApp.fsColorDepth,
|
||||||
60,
|
theApp.fsFrequency,
|
||||||
0);
|
0);
|
||||||
if(hret != DD_OK) {
|
if(hret != DD_OK) {
|
||||||
winlog("Error SetDisplayMode %08x\n", hret);
|
winlog("Error SetDisplayMode %08x\n", hret);
|
||||||
|
|
|
@ -1286,7 +1286,7 @@ void VBA::loadSettings()
|
||||||
fsWidth = regQueryDwordValue("fsWidth", 0);
|
fsWidth = regQueryDwordValue("fsWidth", 0);
|
||||||
fsHeight = regQueryDwordValue("fsHeight", 0);
|
fsHeight = regQueryDwordValue("fsHeight", 0);
|
||||||
fsColorDepth = regQueryDwordValue("fsColorDepth", 0);
|
fsColorDepth = regQueryDwordValue("fsColorDepth", 0);
|
||||||
fsFrequency = regQueryDwordValue("fsFrequency", 0);
|
fsFrequency = regQueryDwordValue("fsFrequency", 60);
|
||||||
fsAdapter = regQueryDwordValue("fsAdapter", 0);
|
fsAdapter = regQueryDwordValue("fsAdapter", 0);
|
||||||
|
|
||||||
if(videoOption == VIDEO_OTHER)
|
if(videoOption == VIDEO_OTHER)
|
||||||
|
@ -1421,27 +1421,32 @@ void VBA::loadSettings()
|
||||||
fsWidth = 320;
|
fsWidth = 320;
|
||||||
fsHeight = 240;
|
fsHeight = 240;
|
||||||
fsColorDepth = 16;
|
fsColorDepth = 16;
|
||||||
|
fsFrequency = 60;
|
||||||
break;
|
break;
|
||||||
case VIDEO_640x480:
|
case VIDEO_640x480:
|
||||||
fsWidth = 640;
|
fsWidth = 640;
|
||||||
fsHeight = 480;
|
fsHeight = 480;
|
||||||
fsColorDepth = 16;
|
fsColorDepth = 16;
|
||||||
break;
|
fsFrequency = 60;
|
||||||
|
break;
|
||||||
case VIDEO_800x600:
|
case VIDEO_800x600:
|
||||||
fsWidth = 800;
|
fsWidth = 800;
|
||||||
fsHeight = 600;
|
fsHeight = 600;
|
||||||
fsColorDepth = 16;
|
fsColorDepth = 16;
|
||||||
break;
|
fsFrequency = 60;
|
||||||
|
break;
|
||||||
case VIDEO_1024x768:
|
case VIDEO_1024x768:
|
||||||
fsWidth = 1024;
|
fsWidth = 1024;
|
||||||
fsHeight = 768;
|
fsHeight = 768;
|
||||||
fsColorDepth = 32;
|
fsColorDepth = 16;
|
||||||
break;
|
fsFrequency = 60;
|
||||||
|
break;
|
||||||
case VIDEO_1280x1024:
|
case VIDEO_1280x1024:
|
||||||
fsWidth = 1280;
|
fsWidth = 1280;
|
||||||
fsHeight = 1024;
|
fsHeight = 1024;
|
||||||
fsColorDepth = 32;
|
fsColorDepth = 16;
|
||||||
break;
|
fsFrequency = 60;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
winGbBorderOn = regQueryDwordValue("borderOn", 0);
|
winGbBorderOn = regQueryDwordValue("borderOn", 0);
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
|
|
Loading…
Reference in New Issue