Swapped conditional arguments for standard SDL readability

This commit is contained in:
Sam Lantinga 2017-08-27 18:52:43 -07:00
parent 30fe9a6799
commit a38f127e88

View File

@ -243,8 +243,8 @@ 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(hmodule, 0, sym, &retval)) {
if (DosLoadModule(&error, sizeof(error), fname, &hmodule) == NO_ERROR) {
if (DosQueryProcAddr(hmodule, 0, sym, &retval) != NO_ERROR) {
DosFreeModule(hmodule);
}
}