mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
dynapi: fill in OS/2 loading code (thanks, Ozkan!).
Partially fixes Bugzilla #3765.
This commit is contained in:
parent
17453d495a
commit
a3890ff6d7
@ -230,6 +230,24 @@ static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
#elif defined(__OS2__)
|
||||
#define INCL_DOS
|
||||
#define INCL_DOSERRORS
|
||||
#include <dos.h>
|
||||
static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
|
||||
{
|
||||
HMODULE hmodule;
|
||||
PFN retval = NULL;
|
||||
char error[256];
|
||||
if (NO_ERROR == DosLoadModule(&error, sizeof(error), fname, &hmodule)) {
|
||||
if (NO_ERROR == DosQueryProcAddr(handle, 0, sym, &retval)) {
|
||||
DosFreeModule(hmodule);
|
||||
}
|
||||
}
|
||||
return (void *) retval;
|
||||
}
|
||||
|
||||
#else
|
||||
#error Please define your platform.
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user