Ignore:
Timestamp:
Aug 17, 1999, 2:44:46 PM (26 years ago)
Author:
sandervl
Message:

divewrap bugfixes + removal of FS save/restore macro calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/divewrap.h

    r422 r522  
    88  #include <dive.h>
    99
     10  inline ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a,
     11                                        ULONG      b )
     12  {
     13    ULONG yyrc;
     14    USHORT sel = RestoreOS2FS();
     15
     16    yyrc = DiveQueryCaps(a, b);
     17    SetFS(sel);
     18
     19    return yyrc;
     20  }
    1021  #undef  DiveQueryCaps
    1122  #define DiveQueryCaps _DiveQueryCaps
    12   inline ULONG APIENTRY DiveQueryCaps ( PDIVE_CAPS a,
    13                                         ULONG      b )
    14   {
    15     ULONG yyrc;
    16     USHORT sel = RestoreOS2FS();
    17 
    18     yyrc = DiveQueryCaps(a, b);
    19     SetFS(sel);
    20 
    21     return yyrc;
    22   }
    23 
     23
     24  inline ULONG APIENTRY _DiveOpen ( HDIVE *a,
     25                                   BOOL   b,
     26                                   PVOID  c )
     27  {
     28    ULONG yyrc;
     29    USHORT sel = RestoreOS2FS();
     30
     31    yyrc = DiveOpen(a, b, c);
     32    SetFS(sel);
     33
     34    return yyrc;
     35  }
    2436  #undef  DiveOpen
    2537  #define DiveOpen _DiveOpen
    26   inline ULONG APIENTRY DiveOpen ( HDIVE *a,
    27                                    BOOL   b,
    28                                    PVOID  c )
    29   {
    30     ULONG yyrc;
    31     USHORT sel = RestoreOS2FS();
    32 
    33     yyrc = DiveOpen(a, b, c);
    34     SetFS(sel);
    35 
    36     return yyrc;
    37   }
    38 
     38
     39  inline ULONG APIENTRY _DiveSetupBlitter ( HDIVE          a,
     40                                           PSETUP_BLITTER b )
     41  {
     42    ULONG yyrc;
     43    USHORT sel = RestoreOS2FS();
     44
     45    yyrc = DiveSetupBlitter(a, b);
     46    SetFS(sel);
     47
     48    return yyrc;
     49  }
    3950  #undef  DiveSetupBlitter
    4051  #define DiveSetupBlitter _DiveSetupBlitter
    41   inline ULONG APIENTRY DiveSetupBlitter ( HDIVE          a,
    42                                            PSETUP_BLITTER b )
    43   {
    44     ULONG yyrc;
    45     USHORT sel = RestoreOS2FS();
    46 
    47     yyrc = DiveSetupBlitter(a, b);
    48     SetFS(sel);
    49 
    50     return yyrc;
    51   }
    52 
     52
     53  inline ULONG APIENTRY _DiveBlitImage ( HDIVE a,
     54                                        ULONG b,
     55                                        ULONG c )
     56  {
     57    ULONG yyrc;
     58    USHORT sel = RestoreOS2FS();
     59
     60    yyrc = DiveBlitImage(a, b, c);
     61    SetFS(sel);
     62
     63    return yyrc;
     64  }
    5365  #undef  DiveBlitImage
    5466  #define DiveBlitImage _DiveBlitImage
    55   inline ULONG APIENTRY DiveBlitImage ( HDIVE a,
    56                                         ULONG b,
    57                                         ULONG c )
    58   {
    59     ULONG yyrc;
    60     USHORT sel = RestoreOS2FS();
    61 
    62     yyrc = DiveBlitImage(a, b, c);
    63     SetFS(sel);
    64 
    65     return yyrc;
    66   }
    67 
    68   #undef  DiveBlitImageLines
    69   #define DiveBlitImageLines _DiveBlitImageLines
    70   inline ULONG APIENTRY DiveBlitImageLines ( HDIVE a,
     67
     68  inline ULONG APIENTRY _DiveBlitImageLines ( HDIVE a,
    7169                                             ULONG b,
    7270                                             ULONG c,
     
    8179    return yyrc;
    8280  }
    83 
     81  #undef  DiveBlitImageLines
     82  #define DiveBlitImageLines _DiveBlitImageLines
     83
     84  inline ULONG APIENTRY _DiveClose ( HDIVE a )
     85  {
     86    ULONG yyrc;
     87    USHORT sel = RestoreOS2FS();
     88
     89    yyrc = DiveClose(a);
     90    SetFS(sel);
     91
     92    return yyrc;
     93  }
    8494  #undef  DiveClose
    8595  #define DiveClose _DiveClose
    86   inline ULONG APIENTRY DiveClose ( HDIVE a )
    87   {
    88     ULONG yyrc;
    89     USHORT sel = RestoreOS2FS();
    90 
    91     yyrc = DiveClose(a);
    92     SetFS(sel);
    93 
    94     return yyrc;
    95   }
    96 
     96
     97  inline ULONG APIENTRY _DiveAcquireFrameBuffer ( HDIVE   a,
     98                                                 PRECTL  b )
     99  {
     100    ULONG yyrc;
     101    USHORT sel = RestoreOS2FS();
     102
     103    yyrc = DiveAcquireFrameBuffer(a, b);
     104    SetFS(sel);
     105
     106    return yyrc;
     107  }
    97108  #undef  DiveAcquireFrameBuffer
    98109  #define DiveAcquireFrameBuffer _DiveAcquireFrameBuffer
    99   inline ULONG APIENTRY DiveAcquireFrameBuffer ( HDIVE   a,
    100                                                  PRECTL  b )
    101   {
    102     ULONG yyrc;
    103     USHORT sel = RestoreOS2FS();
    104 
    105     yyrc = DiveAcquireFrameBuffer(a, b);
    106     SetFS(sel);
    107 
    108     return yyrc;
    109   }
    110 
     110
     111  inline ULONG APIENTRY _DiveSwitchBank ( HDIVE a,
     112                                         ULONG b )
     113  {
     114    ULONG yyrc;
     115    USHORT sel = RestoreOS2FS();
     116
     117    yyrc = DiveSwitchBank(a, b);
     118    SetFS(sel);
     119
     120    return yyrc;
     121  }
    111122  #undef  DiveSwitchBank
    112123  #define DiveSwitchBank _DiveSwitchBank
    113   inline ULONG APIENTRY DiveSwitchBank ( HDIVE a,
    114                                          ULONG b )
    115   {
    116     ULONG yyrc;
    117     USHORT sel = RestoreOS2FS();
    118 
    119     yyrc = DiveSwitchBank(a, b);
    120     SetFS(sel);
    121 
    122     return yyrc;
    123   }
    124 
     124
     125  inline ULONG APIENTRY _DiveDeacquireFrameBuffer ( HDIVE a )
     126  {
     127    ULONG yyrc;
     128    USHORT sel = RestoreOS2FS();
     129
     130    yyrc = DiveDeacquireFrameBuffer(a);
     131    SetFS(sel);
     132
     133    return yyrc;
     134  }
    125135  #undef  DiveDeacquireFrameBuffer
    126136  #define DiveDeacquireFrameBuffer _DiveDeacquireFrameBuffer
    127   inline ULONG APIENTRY DiveDeacquireFrameBuffer ( HDIVE a )
    128   {
    129     ULONG yyrc;
    130     USHORT sel = RestoreOS2FS();
    131 
    132     yyrc = DiveDeacquireFrameBuffer(a);
    133     SetFS(sel);
    134 
    135     return yyrc;
    136   }
    137 
    138   #undef  DiveCalcFrameBufferAddress
    139   #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
    140   inline ULONG APIENTRY DiveCalcFrameBufferAddress ( HDIVE  a,
     137
     138  inline ULONG APIENTRY _DiveCalcFrameBufferAddress ( HDIVE  a,
    141139                                                     PRECTL b,
    142140                                                     PBYTE *c,
     
    152150      return yyrc;
    153151  }
    154 
    155   #undef  DiveAllocImageBuffer
    156   #define DiveAllocImageBuffer _DiveAllocImageBuffer
    157   inline ULONG APIENTRY DiveAllocImageBuffer ( HDIVE  a,
     152  #undef  DiveCalcFrameBufferAddress
     153  #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
     154
     155  inline ULONG APIENTRY _DiveAllocImageBuffer ( HDIVE  a,
    158156                                               PULONG b,
    159157                                               FOURCC c,
     
    171169    return yyrc;
    172170  }
    173 
     171  #undef  DiveAllocImageBuffer
     172  #define DiveAllocImageBuffer _DiveAllocImageBuffer
     173
     174  inline ULONG APIENTRY _DiveFreeImageBuffer ( HDIVE a,
     175                                              ULONG b )
     176  {
     177    ULONG yyrc;
     178    USHORT sel = RestoreOS2FS();
     179
     180    yyrc = DiveFreeImageBuffer(a, b);
     181    SetFS(sel);
     182
     183    return yyrc;
     184  }
    174185  #undef  DiveFreeImageBuffer
    175186  #define DiveFreeImageBuffer _DiveFreeImageBuffer
    176   inline ULONG APIENTRY DiveFreeImageBuffer ( HDIVE a,
    177                                               ULONG b )
    178   {
    179     ULONG yyrc;
    180     USHORT sel = RestoreOS2FS();
    181 
    182     yyrc = DiveFreeImageBuffer(a, b);
    183     SetFS(sel);
    184 
    185     return yyrc;
    186   }
    187 
    188   #undef  DiveBeginImageBufferAccess
    189   #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
    190   inline ULONG APIENTRY DiveBeginImageBufferAccess ( HDIVE  a,
     187
     188  inline ULONG APIENTRY _DiveBeginImageBufferAccess ( HDIVE  a,
    191189                                                     ULONG  b,
    192190                                                     PBYTE *c,
     
    202200    return yyrc;
    203201  }
    204 
     202  #undef  DiveBeginImageBufferAccess
     203  #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
     204
     205  inline ULONG APIENTRY _DiveEndImageBufferAccess ( HDIVE a,
     206                                                   ULONG b )
     207  {
     208    ULONG yyrc;
     209    USHORT sel = RestoreOS2FS();
     210
     211    yyrc = DiveEndImageBufferAccess(a, b);
     212    SetFS(sel);
     213
     214    return yyrc;
     215  }
    205216  #undef  DiveEndImageBufferAccess
    206217  #define DiveEndImageBufferAccess _DiveEndImageBufferAccess
    207   inline ULONG APIENTRY DiveEndImageBufferAccess ( HDIVE a,
    208                                                    ULONG b )
    209   {
    210     ULONG yyrc;
    211     USHORT sel = RestoreOS2FS();
    212 
    213     yyrc = DiveEndImageBufferAccess(a, b);
    214     SetFS(sel);
    215 
    216     return yyrc;
    217   }
    218 
    219   #undef  DiveSetDestinationPalette
    220   #define DiveSetDestinationPalette _DiveSetDestinationPalette
    221   inline ULONG APIENTRY DiveSetDestinationPalette ( HDIVE a,
     218
     219  inline ULONG APIENTRY _DiveSetDestinationPalette ( HDIVE a,
    222220                                                    ULONG b,
    223221                                                    ULONG c,
     
    232230    return yyrc;
    233231  }
    234 
    235   #undef  DiveSetSourcePalette
    236   #define DiveSetSourcePalette _DiveSetSourcePalette
    237   inline ULONG APIENTRY DiveSetSourcePalette ( HDIVE a,
     232  #undef  DiveSetDestinationPalette
     233  #define DiveSetDestinationPalette _DiveSetDestinationPalette
     234
     235  inline ULONG APIENTRY _DiveSetSourcePalette ( HDIVE a,
    238236                                               ULONG b,
    239237                                               ULONG c,
     
    248246    return yyrc;
    249247  }
    250 
    251   #undef  DiveSetTransparentBlitMode
    252   #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
    253   inline ULONG APIENTRY DiveSetTransparentBlitMode ( HDIVE a,
     248  #undef  DiveSetSourcePalette
     249  #define DiveSetSourcePalette _DiveSetSourcePalette
     250
     251  inline ULONG APIENTRY _DiveSetTransparentBlitMode ( HDIVE a,
    254252                                                     ULONG b,
    255253                                                     ULONG c,
     
    264262    return yyrc;
    265263  }
     264  #undef  DiveSetTransparentBlitMode
     265  #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
    266266
    267267
Note: See TracChangeset for help on using the changeset viewer.