xbmc
game.h
1 /*
2  * Copyright (C) 2014-2020 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #ifndef C_API_ADDONINSTANCE_GAME_H
10 #define C_API_ADDONINSTANCE_GAME_H
11 
12 #include "../addon_base.h"
13 
14 #include <stddef.h> /* size_t */
15 
16 //==============================================================================
19 #define DEFAULT_PORT_ID "1"
20 //------------------------------------------------------------------------------
21 
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif /* __cplusplus */
26 
27  //============================================================================
33  typedef enum GAME_ERROR
34  {
36  GAME_ERROR_NO_ERROR,
37 
39  GAME_ERROR_UNKNOWN,
40 
42  GAME_ERROR_NOT_IMPLEMENTED,
43 
45  GAME_ERROR_REJECTED,
46 
48  GAME_ERROR_INVALID_PARAMETERS,
49 
51  GAME_ERROR_FAILED,
52 
54  GAME_ERROR_NOT_LOADED,
55 
57  GAME_ERROR_RESTRICTED,
58  } GAME_ERROR;
59  //----------------------------------------------------------------------------
60 
61  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
70 
71  //============================================================================
76  typedef enum GAME_PCM_FORMAT
77  {
78  GAME_PCM_FORMAT_UNKNOWN,
79 
83  //----------------------------------------------------------------------------
84 
85  //============================================================================
90  typedef enum GAME_AUDIO_CHANNEL
91  {
94 
97 
100 
103 
106 
109 
112 
115 
118 
121 
124 
127 
130 
133 
136 
139 
142 
145 
148 
151 
155  //----------------------------------------------------------------------------
156 
157  //============================================================================
163  {
164  GAME_PCM_FORMAT format;
165  const GAME_AUDIO_CHANNEL* channel_map;
166  } ATTR_PACKED game_stream_audio_properties;
167  //----------------------------------------------------------------------------
168 
169  //============================================================================
175  {
177  const uint8_t* data;
178 
180  size_t size;
181  } ATTR_PACKED game_stream_audio_packet;
182  //----------------------------------------------------------------------------
183 
185 
186  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
195 
196  //============================================================================
201  typedef enum GAME_PIXEL_FORMAT
202  {
203  GAME_PIXEL_FORMAT_UNKNOWN,
204 
207 
210 
214  //----------------------------------------------------------------------------
215 
216  //============================================================================
221  typedef enum GAME_VIDEO_ROTATION
222  {
225 
228 
231 
235  //----------------------------------------------------------------------------
236 
237  //============================================================================
243  {
245  GAME_PIXEL_FORMAT format;
246 
248  unsigned int nominal_width;
249 
251  unsigned int nominal_height;
252 
254  unsigned int max_width;
255 
257  unsigned int max_height;
258 
263  } ATTR_PACKED game_stream_video_properties;
264  //----------------------------------------------------------------------------
265 
266  //============================================================================
272  {
274  unsigned int width;
275 
277  unsigned int height;
278 
280  GAME_VIDEO_ROTATION rotation;
281 
283  const uint8_t* data;
284 
286  size_t size;
287  } ATTR_PACKED game_stream_video_packet;
288  //----------------------------------------------------------------------------
289 
291 
292  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
298 
299  //============================================================================
302  typedef enum GAME_HW_CONTEXT_TYPE
303  {
306 
309 
312 
315 
318 
321 
325  //----------------------------------------------------------------------------
326 
327  //============================================================================
331  {
334  GAME_HW_CONTEXT_TYPE context_type;
335 
340  bool depth;
341 
349  bool stencil;
350 
358 
360  unsigned int version_major;
361 
363  unsigned int version_minor;
364 
377 
381  //----------------------------------------------------------------------------
382 
383  //============================================================================
387  {
389  uintptr_t framebuffer;
390  } ATTR_PACKED game_stream_hw_framebuffer_buffer;
391  //----------------------------------------------------------------------------
392 
393  //============================================================================
397  {
399  uintptr_t framebuffer;
400  } ATTR_PACKED game_stream_hw_framebuffer_packet;
401  //----------------------------------------------------------------------------
402 
403  //============================================================================
406  typedef void (*game_proc_address_t)(void);
407  //----------------------------------------------------------------------------
408 
410 
411  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
417 
418  //============================================================================
423  typedef game_stream_video_properties game_stream_sw_framebuffer_properties;
424  //----------------------------------------------------------------------------
425 
426  //============================================================================
430  {
431  GAME_PIXEL_FORMAT format;
432  uint8_t* data;
433  size_t size;
434  } ATTR_PACKED game_stream_sw_framebuffer_buffer;
435  //----------------------------------------------------------------------------
436 
437  //============================================================================
442  typedef game_stream_video_packet game_stream_sw_framebuffer_packet;
443  //----------------------------------------------------------------------------
444 
446 
447  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
453 
454  //============================================================================
457  typedef enum GAME_STREAM_TYPE
458  {
461 
464 
467 
470 
474  //----------------------------------------------------------------------------
475 
476  //============================================================================
482  typedef struct game_stream_properties
483  {
485  GAME_STREAM_TYPE type;
486  union
487  {
489  game_stream_audio_properties audio;
490 
492  game_stream_video_properties video;
493 
495  game_stream_hw_framebuffer_properties hw_framebuffer;
496 
498  game_stream_sw_framebuffer_properties sw_framebuffer;
499  };
500  } ATTR_PACKED game_stream_properties;
501  //----------------------------------------------------------------------------
502 
503  //============================================================================
506  typedef struct game_stream_buffer
507  {
509  GAME_STREAM_TYPE type;
510  union
511  {
513  game_stream_hw_framebuffer_buffer hw_framebuffer;
514 
516  game_stream_sw_framebuffer_buffer sw_framebuffer;
517  };
518  } ATTR_PACKED game_stream_buffer;
519  //----------------------------------------------------------------------------
520 
521  //============================================================================
528  typedef struct game_stream_packet
529  {
531  GAME_STREAM_TYPE type;
532  union
533  {
535  game_stream_audio_packet audio;
536 
538  game_stream_video_packet video;
539 
541  game_stream_hw_framebuffer_packet hw_framebuffer;
542 
544  game_stream_sw_framebuffer_packet sw_framebuffer;
545  };
546  } ATTR_PACKED game_stream_packet;
547  //----------------------------------------------------------------------------
548 
550 
551  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
557 
558  //============================================================================
562  typedef enum GAME_REGION
563  {
566 
569 
572  } GAME_REGION;
573  //----------------------------------------------------------------------------
574 
575  //============================================================================
580  typedef enum SPECIAL_GAME_TYPE
581  {
584 
587 
590 
594  //----------------------------------------------------------------------------
595 
596  //============================================================================
599  typedef enum GAME_MEMORY
600  {
604 
611 
616 
619 
622 
625 
628 
631 
634 
637 
640  } GAME_MEMORY;
641  //----------------------------------------------------------------------------
642 
643  //============================================================================
645  typedef enum GAME_SIMD
646  {
648  GAME_SIMD_SSE = (1 << 0),
649 
651  GAME_SIMD_SSE2 = (1 << 1),
652 
654  GAME_SIMD_VMX = (1 << 2),
655 
657  GAME_SIMD_VMX128 = (1 << 3),
658 
660  GAME_SIMD_AVX = (1 << 4),
661 
663  GAME_SIMD_NEON = (1 << 5),
664 
666  GAME_SIMD_SSE3 = (1 << 6),
667 
669  GAME_SIMD_SSSE3 = (1 << 7),
670 
672  GAME_SIMD_MMX = (1 << 8),
673 
675  GAME_SIMD_MMXEXT = (1 << 9),
676 
678  GAME_SIMD_SSE4 = (1 << 10),
679 
681  GAME_SIMD_SSE42 = (1 << 11),
682 
684  GAME_SIMD_AVX2 = (1 << 12),
685 
687  GAME_SIMD_VFPU = (1 << 13),
688  } GAME_SIMD;
689  //----------------------------------------------------------------------------
690 
692 
693  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
699 
700  //============================================================================
702  typedef enum GAME_INPUT_EVENT_SOURCE
703  {
705  GAME_INPUT_EVENT_DIGITAL_BUTTON,
706 
708  GAME_INPUT_EVENT_ANALOG_BUTTON,
709 
711  GAME_INPUT_EVENT_AXIS,
712 
714  GAME_INPUT_EVENT_ANALOG_STICK,
715 
717  GAME_INPUT_EVENT_ACCELEROMETER,
718 
720  GAME_INPUT_EVENT_KEY,
721 
723  GAME_INPUT_EVENT_RELATIVE_POINTER,
724 
726  GAME_INPUT_EVENT_ABSOLUTE_POINTER,
727 
729  GAME_INPUT_EVENT_MOTOR,
730  } GAME_INPUT_EVENT_SOURCE;
731  //----------------------------------------------------------------------------
732 
733  //============================================================================
735  typedef enum GAME_KEY_MOD
736  {
738  GAME_KEY_MOD_NONE = 0x0000,
739 
741  GAME_KEY_MOD_SHIFT = 0x0001,
742 
744  GAME_KEY_MOD_CTRL = 0x0002,
745 
747  GAME_KEY_MOD_ALT = 0x0004,
748 
750  GAME_KEY_MOD_META = 0x0008,
751 
753  GAME_KEY_MOD_SUPER = 0x0010,
754 
756  GAME_KEY_MOD_NUMLOCK = 0x0100,
757 
759  GAME_KEY_MOD_CAPSLOCK = 0x0200,
760 
762  GAME_KEY_MOD_SCROLLOCK = 0x0400,
763  } GAME_KEY_MOD;
764  //----------------------------------------------------------------------------
765 
766  //============================================================================
768  typedef enum GAME_PORT_TYPE
769  {
772 
775 
778 
781  } GAME_PORT_TYPE;
782  //----------------------------------------------------------------------------
783 
792  typedef struct game_controller_layout
793  {
794  char* controller_id;
795  bool provides_input; // False for multitaps
796  char** digital_buttons;
797  unsigned int digital_button_count;
798  char** analog_buttons;
799  unsigned int analog_button_count;
800  char** analog_sticks;
801  unsigned int analog_stick_count;
802  char** accelerometers;
803  unsigned int accelerometer_count;
804  char** keys;
805  unsigned int key_count;
806  char** rel_pointers;
807  unsigned int rel_pointer_count;
808  char** abs_pointers;
809  unsigned int abs_pointer_count;
810  char** motors;
811  unsigned int motor_count;
812  } ATTR_PACKED game_controller_layout;
815  struct game_input_port;
816 
817  //============================================================================
819  typedef struct game_input_device
820  {
822  const char* controller_id;
823 
825  const char* port_address;
826 
828  struct game_input_port* available_ports;
829 
831  unsigned int port_count;
832  } ATTR_PACKED game_input_device;
833  //----------------------------------------------------------------------------
834 
835  //============================================================================
842  typedef struct game_input_port
843  {
845  GAME_PORT_TYPE type;
846 
848  const char* port_id;
849 
856 
858  game_input_device* accepted_devices;
859 
861  unsigned int device_count;
862  } ATTR_PACKED game_input_port;
863  //----------------------------------------------------------------------------
864 
865  //============================================================================
872  typedef struct game_input_topology
873  {
875  game_input_port* ports;
876 
878  unsigned int port_count;
879 
882  } ATTR_PACKED game_input_topology;
883  //----------------------------------------------------------------------------
884 
885  //============================================================================
888  {
890  bool pressed;
891  } ATTR_PACKED game_digital_button_event;
892  //----------------------------------------------------------------------------
893 
894  //============================================================================
897  {
899  float magnitude;
900  } ATTR_PACKED game_analog_button_event;
901  //----------------------------------------------------------------------------
902 
903  //============================================================================
905  typedef struct game_axis_event
906  {
908  float position;
909  } ATTR_PACKED game_axis_event;
910  //----------------------------------------------------------------------------
911 
912  //============================================================================
914  typedef struct game_analog_stick_event
915  {
917  float x;
918 
920  float y;
921  } ATTR_PACKED game_analog_stick_event;
922  //----------------------------------------------------------------------------
923 
924  //============================================================================
927  {
929  float x;
930 
932  float y;
933 
935  float z;
936  } ATTR_PACKED game_accelerometer_event;
937  //----------------------------------------------------------------------------
938 
939  //============================================================================
941  typedef struct game_key_event
942  {
944  bool pressed;
945 
951  uint32_t unicode;
952 
954  GAME_KEY_MOD modifiers;
955  } ATTR_PACKED game_key_event;
956  //----------------------------------------------------------------------------
957 
958  //============================================================================
960  typedef struct game_rel_pointer_event
961  {
963  int x;
964 
966  int y;
967  } ATTR_PACKED game_rel_pointer_event;
968  //----------------------------------------------------------------------------
969 
970  //============================================================================
972  typedef struct game_abs_pointer_event
973  {
975  bool pressed;
976 
978  float x;
979 
981  float y;
982  } ATTR_PACKED game_abs_pointer_event;
983  //----------------------------------------------------------------------------
984 
985  //============================================================================
987  typedef struct game_motor_event
988  {
990  float magnitude;
991  } ATTR_PACKED game_motor_event;
992  //----------------------------------------------------------------------------
993 
994  //============================================================================
996  typedef struct game_input_event
997  {
999  GAME_INPUT_EVENT_SOURCE type;
1000 
1002  const char* controller_id;
1003 
1005  GAME_PORT_TYPE port_type;
1006 
1008  const char* port_address;
1009 
1011  const char* feature_name;
1012  union
1013  {
1015  struct game_digital_button_event digital_button;
1016 
1018  struct game_analog_button_event analog_button;
1019 
1021  struct game_axis_event axis;
1022 
1024  struct game_analog_stick_event analog_stick;
1025 
1027  struct game_accelerometer_event accelerometer;
1028 
1030  struct game_key_event key;
1031 
1033  struct game_rel_pointer_event rel_pointer;
1034 
1036  struct game_abs_pointer_event abs_pointer;
1037 
1039  struct game_motor_event motor;
1040  };
1041  } ATTR_PACKED game_input_event;
1042  //----------------------------------------------------------------------------
1043 
1045 
1046  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
1052 
1053  //============================================================================
1057  {
1059  double fps;
1060 
1062  double sample_rate;
1063  };
1064  //----------------------------------------------------------------------------
1065 
1067 
1068  //--==----==----==----==----==----==----==----==----==----==----==----==----==--
1069 
1075  typedef struct AddonProps_Game
1076  {
1081 
1085  const char** proxy_dll_paths;
1086 
1090  unsigned int proxy_dll_count;
1091 
1096  const char** resource_directories;
1097 
1102 
1108  const char* profile_directory;
1109 
1114 
1118  const char** extensions;
1119 
1123  unsigned int extension_count;
1124  } AddonProps_Game;
1125 
1126  typedef void* KODI_GAME_STREAM_HANDLE;
1127 
1130  struct AddonInstance_Game;
1131 
1138  {
1139  KODI_HANDLE kodiInstance;
1140 
1141  void (*CloseGame)(KODI_HANDLE kodiInstance);
1142  KODI_GAME_STREAM_HANDLE (*OpenStream)(KODI_HANDLE, const struct game_stream_properties*);
1143  bool (*GetStreamBuffer)(KODI_HANDLE,
1144  KODI_GAME_STREAM_HANDLE,
1145  unsigned int,
1146  unsigned int,
1147  struct game_stream_buffer*);
1148  void (*AddStreamData)(KODI_HANDLE, KODI_GAME_STREAM_HANDLE, const struct game_stream_packet*);
1149  void (*ReleaseStreamBuffer)(KODI_HANDLE, KODI_GAME_STREAM_HANDLE, struct game_stream_buffer*);
1150  void (*CloseStream)(KODI_HANDLE, KODI_GAME_STREAM_HANDLE);
1151  game_proc_address_t (*HwGetProcAddress)(KODI_HANDLE kodiInstance, const char* symbol);
1152  bool (*InputEvent)(KODI_HANDLE kodiInstance, const struct game_input_event* event);
1154 
1161  {
1162  KODI_HANDLE addonInstance;
1163 
1164  GAME_ERROR(__cdecl* LoadGame)(const struct AddonInstance_Game*, const char*);
1165  GAME_ERROR(__cdecl* LoadGameSpecial)
1166  (const struct AddonInstance_Game*, enum SPECIAL_GAME_TYPE, const char**, size_t);
1167  GAME_ERROR(__cdecl* LoadStandalone)(const struct AddonInstance_Game*);
1168  GAME_ERROR(__cdecl* UnloadGame)(const struct AddonInstance_Game*);
1169  GAME_ERROR(__cdecl* GetGameTiming)
1170  (const struct AddonInstance_Game*, struct game_system_timing*);
1171  GAME_REGION(__cdecl* GetRegion)(const struct AddonInstance_Game*);
1172  bool(__cdecl* RequiresGameLoop)(const struct AddonInstance_Game*);
1173  GAME_ERROR(__cdecl* RunFrame)(const struct AddonInstance_Game*);
1174  GAME_ERROR(__cdecl* Reset)(const struct AddonInstance_Game*);
1175  GAME_ERROR(__cdecl* HwContextReset)(const struct AddonInstance_Game*);
1176  GAME_ERROR(__cdecl* HwContextDestroy)(const struct AddonInstance_Game*);
1177  bool(__cdecl* HasFeature)(const struct AddonInstance_Game*, const char*, const char*);
1178  game_input_topology*(__cdecl* GetTopology)(const struct AddonInstance_Game*);
1179  void(__cdecl* FreeTopology)(const struct AddonInstance_Game*, struct game_input_topology*);
1180  void(__cdecl* SetControllerLayouts)(const struct AddonInstance_Game*,
1181  const struct game_controller_layout*,
1182  unsigned int);
1183  bool(__cdecl* EnableKeyboard)(const struct AddonInstance_Game*, bool, const char*);
1184  bool(__cdecl* EnableMouse)(const struct AddonInstance_Game*, bool, const char*);
1185  bool(__cdecl* ConnectController)(const struct AddonInstance_Game*,
1186  bool,
1187  const char*,
1188  const char*);
1189  bool(__cdecl* InputEvent)(const struct AddonInstance_Game*, const struct game_input_event*);
1190  size_t(__cdecl* SerializeSize)(const struct AddonInstance_Game*);
1191  GAME_ERROR(__cdecl* Serialize)(const struct AddonInstance_Game*, uint8_t*, size_t);
1192  GAME_ERROR(__cdecl* Deserialize)(const struct AddonInstance_Game*, const uint8_t*, size_t);
1193  GAME_ERROR(__cdecl* CheatReset)(const struct AddonInstance_Game*);
1194  GAME_ERROR(__cdecl* GetMemory)
1195  (const struct AddonInstance_Game*, enum GAME_MEMORY, uint8_t**, size_t*);
1196  GAME_ERROR(__cdecl* SetCheat)
1197  (const struct AddonInstance_Game*, unsigned int, bool, const char*);
1198  GAME_ERROR(__cdecl* RCGenerateHashFromFile)
1199  (const AddonInstance_Game*, char**, unsigned int, const char*);
1200  GAME_ERROR(__cdecl* RCGetGameIDUrl)(const AddonInstance_Game*, char**, const char*);
1201  GAME_ERROR(__cdecl* RCGetPatchFileUrl)
1202  (const AddonInstance_Game*, char**, const char*, const char*, unsigned int);
1203  GAME_ERROR(__cdecl* RCPostRichPresenceUrl)
1204  (const AddonInstance_Game*,
1205  char**,
1206  char**,
1207  const char*,
1208  const char*,
1209  unsigned int,
1210  const char*);
1211  GAME_ERROR(__cdecl* RCEnableRichPresence)(const AddonInstance_Game*, const char*);
1212  GAME_ERROR(__cdecl* RCGetRichPresenceEvaluation)
1213  (const AddonInstance_Game*, char**, unsigned int);
1214  GAME_ERROR(__cdecl* RCResetRuntime)(const AddonInstance_Game*);
1215  void(__cdecl* FreeString)(const AddonInstance_Game*, char*);
1217 
1223  typedef struct AddonInstance_Game
1224  {
1225  struct AddonProps_Game* props;
1226  struct AddonToKodiFuncTable_Game* toKodi;
1227  struct KodiToAddonFuncTable_Game* toAddon;
1229 
1230 #ifdef __cplusplus
1231 }
1232 #endif /* __cplusplus */
1233 
1234 #endif /* !C_API_ADDONINSTANCE_GAME_H */
Hardware framebuffer packet
Definition: game.h:396
Definition: game.h:987
struct game_stream_video_properties game_stream_video_properties
Game video stream properties
Channel back right over center.
Definition: game.h:153
unsigned int height
Video width.
Definition: game.h:277
struct game_stream_packet game_stream_packet
Stream packet and ephemeral metadata
unsigned int version_major
Major version number for core GL context or GLES 3.1+.
Definition: game.h:360
Video ram lets a frontend peek into a game systems video RAM (VRAM)
Definition: game.h:621
Game callbacks.
Definition: game.h:1137
0RGB8888 Format
Definition: game.h:206
Definition: game.h:960
double fps
FPS of video content.
Definition: game.h:1059
unsigned int max_width
The maximal used width.
Definition: game.h:254
Unknown.
Definition: game.h:460
Game properties.
Definition: game.h:1075
GAME_AUDIO_CHANNEL
Audio channel
Definition: game.h:90
Channel bacl left over center.
Definition: game.h:150
Regular save ram.
Definition: game.h:610
Hardware framebuffer properties
Definition: game.h:330
SIMD CPU AVX.
Definition: game.h:660
Special memory type.
Definition: game.h:630
GAME_VIDEO_ROTATION
Video rotation position
Definition: game.h:221
rotate 270° counterclockwise
Definition: game.h:233
unsigned int nominal_width
The nominal used width.
Definition: game.h:248
Hardware framebuffer.
Definition: game.h:469
Channel Low Frequency Effects / Subwoofer.
Definition: game.h:105
Vulkan.
Definition: game.h:323
Definition: game.h:941
Channel top center.
Definition: game.h:138
Channel front center.
Definition: game.h:102
Channel surround/side right.
Definition: game.h:126
Port that can provide input.
Definition: game.h:842
OpenGL ES 3.1+. Set major/minor fields.
Definition: game.h:320
game_stream_video_properties game_stream_sw_framebuffer_properties
Game video stream properties
Definition: game.h:423
struct game_stream_hw_framebuffer_buffer game_stream_hw_framebuffer_buffer
Hardware framebuffer buffer
SPECIAL_GAME_TYPE
**Special game types passed into game_load_game_special().
Definition: game.h:580
Some games have a built-in clock to keep track of time.
Definition: game.h:615
const uint8_t * data
Pointer for video stream data given to Kodi.
Definition: game.h:283
unsigned int port_count
The number of ports.
Definition: game.h:878
SIMD CPU SSSE3.
Definition: game.h:669
The input topology is the possible ways to connect input devices.
Definition: game.h:872
bool supports_vfs
Definition: game.h:1113
GAME_PCM_FORMAT
Stream Format
Definition: game.h:76
struct game_stream_sw_framebuffer_buffer game_stream_sw_framebuffer_buffer
Hardware framebuffer type
OpenGL ES 3.0.
Definition: game.h:317
Channel top front center.
Definition: game.h:135
bool force_connected
Flag to prevent a port from being disconnected.
Definition: game.h:855
Special memory type.
Definition: game.h:627
unsigned int extension_count
Definition: game.h:1123
SIMD CPU VFPU.
Definition: game.h:687
Channel front right over center.
Definition: game.h:117
Channel back left.
Definition: game.h:108
game_input_port * ports
The list of ports on the virtual game console.
Definition: game.h:875
SIMD CPU MMX.
Definition: game.h:672
Channel top back right.
Definition: game.h:144
GAME_VIDEO_ROTATION rotation
Width GAME_VIDEO_ROTATION defined rotation angle.
Definition: game.h:280
rotate 180° counterclockwise
Definition: game.h:230
Channel front left over center.
Definition: game.h:114
Game video stream properties
Definition: game.h:242
struct game_input_port game_input_port
Port that can provide input.
Audio stream.
Definition: game.h:463
unsigned int width
Video height.
Definition: game.h:274
Game Type super game boy.
Definition: game.h:592
void(* game_proc_address_t)(void)
Hardware framebuffer process function address
Definition: game.h:406
Channel top back center.
Definition: game.h:147
Definition: game.h:926
Channel surround/side left.
Definition: game.h:123
OpenGL ES 2.0.
Definition: game.h:311
Definition: game.h:914
Channel top front left.
Definition: game.h:129
Game port controller.
Definition: game.h:780
struct game_stream_hw_framebuffer_properties game_stream_hw_framebuffer_properties
Hardware framebuffer properties
Stream packet and ephemeral metadata
Definition: game.h:528
const uint8_t * data
Pointer for audio stream data given to Kodi.
Definition: game.h:177
int player_limit
A limit on the number of input-providing devices, or -1 for no limit.
Definition: game.h:881
Special memory type.
Definition: game.h:633
uint32_t unicode
If the keypress generates a printing character.
Definition: game.h:951
GAME_HW_CONTEXT_TYPE context_type
The API to use.
Definition: game.h:334
size_t size
Size of data array.
Definition: game.h:286
None context.
Definition: game.h:305
Channel top front right.
Definition: game.h:132
const char ** resource_directories
Definition: game.h:1096
Special memory type.
Definition: game.h:639
Definition: game.h:896
bool stencil
Set if stencil buffers should be attached.
Definition: game.h:349
GAME_HW_CONTEXT_TYPE
Hardware framebuffer type
Definition: game.h:302
Device that can provide input.
Definition: game.h:819
const char * profile_directory
Definition: game.h:1108
unsigned int max_height
The maximal used height.
Definition: game.h:257
const char * port_id
Required for GAME_PORT_CONTROLLER type.
Definition: game.h:848
S16NE sample format.
Definition: game.h:81
Game Type BSX.
Definition: game.h:583
Game region NTSC.
Definition: game.h:568
Game function hooks.
Definition: game.h:1160
const char ** proxy_dll_paths
Definition: game.h:1085
SIMD CPU AVX2.
Definition: game.h:684
bool cache_context
If this is true, the frontend will go very far to avoid resetting context in scenarios like toggling ...
Definition: game.h:376
OpenGL 2.x. Driver can choose to use latest compatibility context.
Definition: game.h:308
GAME_MEMORY
Game Memory
Definition: game.h:599
struct game_stream_video_packet game_stream_video_packet
Video stream packet
Channel top back left.
Definition: game.h:141
0RGB1555 Format
Definition: game.h:212
game_stream_video_packet game_stream_sw_framebuffer_packet
Video stream packet
Definition: game.h:442
struct game_stream_hw_framebuffer_packet game_stream_hw_framebuffer_packet
Hardware framebuffer packet
GAME_PORT_TYPE
Type of port on the virtual game console.
Definition: game.h:768
Software framebuffer.
Definition: game.h:472
bool bottom_left_origin
Use conventional bottom-left origin convention.
Definition: game.h:357
Hardware framebuffer type
Definition: game.h:429
const char * game_client_dll_path
Definition: game.h:1080
Stream buffers for hardware rendering and zero-copy support
Definition: game.h:506
RGB565 Format.
Definition: game.h:209
unsigned int version_minor
Minor version number for core GL context or GLES 3.1+.
Definition: game.h:363
SIMD CPU VMX128.
Definition: game.h:657
struct game_input_device game_input_device
Device that can provide input.
Channel back right.
Definition: game.h:111
GAME_PIXEL_FORMAT
Pixel format
Definition: game.h:201
struct game_stream_properties game_stream_properties
Immutable stream metadata
struct game_input_topology game_input_topology
The input topology is the possible ways to connect input devices.
Game Type BSX slotted.
Definition: game.h:586
GAME_SIMD
ID values for SIMD CPU features
Definition: game.h:645
struct game_stream_buffer game_stream_buffer
Stream buffers for hardware rendering and zero-copy support
SIMD CPU SSE2.
Definition: game.h:651
rotate 90° counterclockwise
Definition: game.h:227
SIMD CPU SSE4.
Definition: game.h:678
Hardware framebuffer buffer
Definition: game.h:386
SIMD CPU SSE3.
Definition: game.h:666
GAME_REGION
Game reguin definition
Definition: game.h:562
const char ** extensions
Definition: game.h:1118
struct game_stream_audio_packet game_stream_audio_packet
Audio stream packet
Channel front left.
Definition: game.h:96
SIMD CPU MMXEXT.
Definition: game.h:675
Passed to game_get_memory_data/size().
Definition: game.h:603
Modern desktop core GL context. Use major/minor fields to set GL version.
Definition: game.h:314
unsigned int proxy_dll_count
Definition: game.h:1090
GAME_PIXEL_FORMAT format
The stream&#39;s pixel format.
Definition: game.h:245
SIMD CPU SSE42.
Definition: game.h:681
Game port unknown.
Definition: game.h:771
Definition: game.h:905
Definition: game.h:887
Game instance.
Definition: game.h:1223
struct game_stream_audio_properties game_stream_audio_properties
Game audio stream properties
Channel back center.
Definition: game.h:120
Definition: game.h:996
Game Type sufami turbo.
Definition: game.h:589
System ram lets a frontend peek into a game systems main RAM.
Definition: game.h:618
Channel front right.
Definition: game.h:99
Video stream.
Definition: game.h:466
bool depth
Set if render buffers should have depth component attached.
Definition: game.h:340
Game port mouse.
Definition: game.h:777
float aspect_ratio
On video stream used aspect ration.
Definition: game.h:262
Audio stream packet
Definition: game.h:174
Immutable stream metadata
Definition: game.h:482
Game port Keyboard.
Definition: game.h:774
unsigned int resource_directory_count
Definition: game.h:1101
Special memory type.
Definition: game.h:636
const char * controller_id
ID used in the Kodi controller API.
Definition: game.h:822
SIMD CPU SSE.
Definition: game.h:648
double sample_rate
Sampling rate of audio.
Definition: game.h:1062
Channel list terminator.
Definition: game.h:93
SIMD CPU VMX.
Definition: game.h:654
Game region unknown.
Definition: game.h:565
Game region PAL.
Definition: game.h:571
bool debug_context
Creates a debug context.
Definition: game.h:379
Game system timing.
Definition: game.h:1056
Game audio stream properties
Definition: game.h:162
SIMD CPU NEON.
Definition: game.h:663
GAME_STREAM_TYPE
Game stream types
Definition: game.h:457
Video stream packet
Definition: game.h:271
Definition: game.h:972
0° and Without rotation
Definition: game.h:224
unsigned int nominal_height
The nominal used height.
Definition: game.h:251
size_t size
Size of data array.
Definition: game.h:180
Special memory type.
Definition: game.h:624