summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-11-28 20:01:46 +0000
committerDarkvater <Darkvater@openttd.org>2006-11-28 20:01:46 +0000
commitea965a4adf955d8a046959dd8c3c71f3d1ab3230 (patch)
tree815a737f5dc8dec656dc08fbf6449a0fd2daf64f /video
parent8d29e3efdbae96a8ce33547aa3d660865f1a1e7c (diff)
downloadopenttd-ea965a4adf955d8a046959dd8c3c71f3d1ab3230.tar.xz
(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.
Diffstat (limited to 'video')
-rw-r--r--video/win32_v.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/video/win32_v.c b/video/win32_v.c
index a2f46378e..be105c480 100644
--- a/video/win32_v.c
+++ b/video/win32_v.c
@@ -668,9 +668,12 @@ static void FindResolutions(void)
{
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;