Mercurial > hg > openttd
changeset 5169:693380f326c4 draft
(svn r7279) -Codechange: [win32] Add Windows95/98 support by using MSLU. Only workaround is that the
wide version of EnumDisplaySettings crashes on win95 no matter what, so use ANSI version.
NOTE: MSLU support is only added to VS2003 project file because VS2005 compiles won't
even run on Windows95.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Tue, 28 Nov 2006 20:01:46 +0000 |
parents | e940a99129ae |
children | 6ea3e5cdbc3b |
files | openttd.vcproj video/win32_v.c |
diffstat | 2 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/openttd.vcproj +++ b/openttd.vcproj @@ -17,7 +17,7 @@ ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2" + CharacterSet="1" WholeProgramOptimization="TRUE"> <Tool Name="VCCLCompilerTool" @@ -97,7 +97,7 @@ ConfigurationType="1" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> + CharacterSet="1"> <Tool Name="VCCLCompilerTool" Optimization="0" @@ -121,7 +121,7 @@ Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" - AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib" + AdditionalDependencies="unicows.lib winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib" OutputFile=".\Debug/openttd.exe" LinkIncremental="0" SuppressStartupBanner="TRUE" @@ -674,6 +674,9 @@ RelativePath=".\waypoint.h"> </File> <File + RelativePath=".\win32.h"> + </File> + <File RelativePath=".\music\win32_m.h"> </File> <File
--- a/video/win32_v.c +++ b/video/win32_v.c @@ -668,9 +668,12 @@ { uint n = 0; uint i; - DEVMODE dm; + DEVMODEA dm; - for (i = 0; EnumDisplaySettings(NULL, i, &dm) != 0; i++) { + /* XXX - EnumDisplaySettingsW crashes with unicows.dll on Windows95 + * Doesn't really matter since we don't pass a string anyways, but still + * a letdown */ + for (i = 0; EnumDisplaySettingsA(NULL, i, &dm) != 0; i++) { if (dm.dmBitsPerPel == 8 && IS_INT_INSIDE(dm.dmPelsWidth, 640, MAX_SCREEN_WIDTH + 1) && IS_INT_INSIDE(dm.dmPelsHeight, 480, MAX_SCREEN_HEIGHT + 1)) { uint j;