mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Updates the SDL library to the latest standard bugfix release
This commit is contained in:
parent
cb766f2878
commit
083d2175ea
1280 changed files with 343926 additions and 179615 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
/* Test program to test dynamic loading with the loadso subsystem.
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -19,10 +19,9 @@
|
|||
|
||||
#include "SDL.h"
|
||||
|
||||
typedef int (*fntype) (const char *);
|
||||
typedef int (*fntype)(const char *);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int retval = 0;
|
||||
int hello = 0;
|
||||
|
|
@ -56,23 +55,21 @@ main(int argc, char *argv[])
|
|||
lib = SDL_LoadObject(libname);
|
||||
if (lib == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadObject('%s') failed: %s\n",
|
||||
libname, SDL_GetError());
|
||||
libname, SDL_GetError());
|
||||
retval = 3;
|
||||
} else {
|
||||
fn = (fntype) SDL_LoadFunction(lib, symname);
|
||||
fn = (fntype)SDL_LoadFunction(lib, symname);
|
||||
if (fn == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadFunction('%s') failed: %s\n",
|
||||
symname, SDL_GetError());
|
||||
symname, SDL_GetError());
|
||||
retval = 4;
|
||||
} else {
|
||||
SDL_Log("Found %s in %s at %p\n", symname, libname, fn);
|
||||
if (hello) {
|
||||
SDL_Log("Calling function...\n");
|
||||
fflush(stdout);
|
||||
fn(" HELLO, WORLD!\n");
|
||||
SDL_Log("...apparently, we survived. :)\n");
|
||||
SDL_Log("Unloading library...\n");
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
SDL_UnloadObject(lib);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue