Watcom.mif
author Patrice Mandin <patmandin@gmail.com>
Thu, 19 Jan 2006 21:28:52 +0000
changeset 1257 448a9a64537b
parent 1190 173c063d4f55
permissions -rw-r--r--
[PATCH] SDL_GetVideoMode() does not find best mode, part 2

Following commit 1.51, I come accross a problem when SDL must choose between
several video modes that could suit the one asked.

If I ask 320x240 with this list:
768x480 768x240 640x400 640x200 384x480 384x240 320x400 320x200

The smallest selectables modes are 384x240 and 320x400. And SDL choose the later
in this list, but 384x240 is more suitable. So I added a check to compare
the pixel count (surface) of modes, and select the one which has the smallest
pixel count.

In my example, 384x240 has 92160 pixels, and 320x400 has 128000 pixels. So now
SDL will choose 384x240 for the asked 320x240 mode.
icculus@1190
     1
#=============================================================================
icculus@1190
     2
#             This file contains the common includes for the
icculus@1190
     3
#               Watcom makefiles to build SDL.DLL for OS/2
icculus@1190
     4
#
icculus@1190
     5
#
icculus@1190
     6
#=============================================================================
icculus@1190
     7
icculus@1190
     8
# Create debug build or not?
icculus@1190
     9
#debug_build=defined
icculus@1190
    10
icculus@1190
    11
# Special flags for building SDL
icculus@1190
    12
SDLCFlags = -dBUILD_SDL -dCHECK_LEAKS
icculus@1190
    13
icculus@1190
    14
#
icculus@1190
    15
#==============================================================================
icculus@1190
    16
#
icculus@1190
    17
icculus@1190
    18
!ifdef debug_build
icculus@1190
    19
debugflags = -d2 -dDEBUG_BUILD
icculus@1190
    20
!else
icculus@1190
    21
debugflags =
icculus@1190
    22
!endif
icculus@1190
    23
icculus@1190
    24
cflags = -zq $(debugflags) -bd -bm -bt=OS2 -5s -fpi -sg -otexan -wx -ei $(SDLCFlags) $(ExtraCFlags)
icculus@1190
    25
icculus@1190
    26
.extensions:
icculus@1190
    27
.extensions: .lib .dll .obj .c .asm
icculus@1190
    28
icculus@1190
    29
.c.obj : .AUTODEPEND
icculus@1190
    30
    wcc386 $[* $(cflags)
icculus@1190
    31
icculus@1190
    32
.asm.obj : .AUTODEPEND
icculus@1190
    33
    nasm -t -O2 -f obj -I$(%include) $[*.asm