File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 6767 statically linked into the project. After that you need to call the
6868 SDL_LoadLib function by your application before using any SDL2 library calls.
6969
70+ "WARNING: This is an experimental feature! Many functions are not prepared to be
71+ loaded at runtime, check beforehand if a function is translated already.
72+ You can help adding functions by simply replacing
73+
74+ { --- describing comment ---}
75+ function SDL_CreateWindowAndRenderer (width: cint32; height: cint32; window_flags: cuint32; window: PPSDL_Window; renderer: PPSDL_Renderer): cint32; cdecl; external SDL_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _SDL_CreateWindowAndRenderer' { $ENDIF} { $ENDIF} ;
76+
77+ by
78+
79+ type
80+ TSDL_CreateWindowAndRenderer_func = function(width: cint32; height: cint32; window_flags: cuint32; window: PPSDL_Window; renderer: PPSDL_Renderer): cint32; cdecl;
81+ var
82+ { --- describing comment ---}
83+ SDL_CreateWindowAndRenderer: TSDL_CreateWindowAndRenderer_func = nil ;
84+
85+ And you need to register the function in sdl_runtime_linking.inc by uncommenting
86+ (or adding if not already in the list). For this example I must add:
87+
88+ SDL_CreateWindowAndRenderer := TSDL_CreateWindowAndRenderer_func(GetProcAddress(LibHandle, ' SDL_CreateWindowAndRenderer' ));
89+ if not Assigned(SDL_CreateWindowAndRenderer) then Result := False;"
7090}
7191//{$DEFINE SDL_RUNTIME_LOADING}
7292
You can’t perform that action at this time.
0 commit comments