OS/2: proper fix for dynapi (thanks, Ozkan!).
authorRyan C. Gordon <icculus@icculus.org>
Fri, 25 Aug 2017 11:31:12 -0400
changeset 113486e1d0d1e2a5b
parent 11347 7f254d0b7842
child 11349 d103eacbb2cd
OS/2: proper fix for dynapi (thanks, Ozkan!).
src/dynapi/SDL_dynapi.c
     1.1 --- a/src/dynapi/SDL_dynapi.c	Thu Aug 24 22:57:42 2017 -0400
     1.2 +++ b/src/dynapi/SDL_dynapi.c	Fri Aug 25 11:31:12 2017 -0400
     1.3 @@ -24,6 +24,12 @@
     1.4  
     1.5  #if SDL_DYNAMIC_API
     1.6  
     1.7 +#if defined(__OS2__)
     1.8 +#define INCL_DOS
     1.9 +#define INCL_DOSERRORS
    1.10 +#include <dos.h>
    1.11 +#endif
    1.12 +
    1.13  #include "SDL.h"
    1.14  
    1.15  /* !!! FIXME: Shouldn't these be included in SDL.h? */
    1.16 @@ -232,16 +238,13 @@
    1.17  }
    1.18  
    1.19  #elif defined(__OS2__)
    1.20 -#define INCL_DOS
    1.21 -#define INCL_DOSERRORS
    1.22 -#include <dos.h>
    1.23  static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
    1.24  {
    1.25      HMODULE hmodule;
    1.26      PFN retval = NULL;
    1.27      char error[256];
    1.28      if (NO_ERROR == DosLoadModule(&error, sizeof(error), fname, &hmodule)) {
    1.29 -        if (NO_ERROR == DosQueryProcAddr(handle, 0, sym, &retval)) {
    1.30 +        if (NO_ERROR == DosQueryProcAddr(hmodule, 0, sym, &retval)) {
    1.31              DosFreeModule(hmodule);
    1.32          }
    1.33      }