sdlerror_c.inc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // based on "sdl_error_c.h" (2.0.14)
  2. {* This file defines a structure that carries language-independent
  3. error messages
  4. *}
  5. const
  6. ERR_MAX_STRLEN = 128;
  7. //ERR_MAX_ARGS = 5; { Obsolete in 2.0.14? }
  8. type
  9. PPSDL_Error = ^PSDL_Error;
  10. PSDL_Error = ^TSDL_Error;
  11. TSDL_Error = record
  12. {* This is a numeric value corresponding to the current error *}
  13. error: cint;
  14. str: String[ERR_MAX_STRLEN];
  15. end;
  16. { Seems the error structure has changed drastically by SDL2 ver. 2.0.14?!
  17. For ref. the old structure: (Can be deleted in later versions) }
  18. //TSDL_Error = record
  19. // {* This is a numeric value corresponding to the current error *}
  20. // error: cint;
  21. //
  22. // {* This is a key used to index into a language hashtable containing
  23. // internationalized versions of the SDL error messages. If the key
  24. // is not in the hashtable, or no hashtable is available, the key is
  25. // used directly as an error message format string.
  26. // *}
  27. // key: String[ERR_MAX_STRLEN];
  28. //
  29. // {* These are the arguments for the error functions *}
  30. // argc: cint32;
  31. // case cint32 of
  32. // {* What is a character anyway? (UNICODE issues) *}
  33. // 0: (value_c: Byte;);
  34. // 1: (value_ptr: Pointer;);
  35. // 2: (value_i: cint32;);
  36. // 3: (value_f: Double;);
  37. // 4: (buf: String[ERR_MAX_STRLEN];);
  38. //end;