Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Game Control

Used to display the currently playing game, with optional effects, while playing a game.

The gamewindow control is used for displaying the currently playing game elsewhere in the Kodi GUI. You can choose the position, and size of the game displayed, as well as various effects. Note that the control is only rendered if game is being played.


Example

<control type="gamewindow" id="2">
<description>My first game control</description>
<posx>80</posx>
<posy>60</posy>
<width>250</width>
<height>200</height>
<videofilter>nearest</videofilter>
<stretchmode>normal</stretchmode>
<rotation>0</rotation>
</control>
const char const uint8_t size_t unsigned int unsigned int * height
Definition kodi-dev-kit/include/kodi/c-api/addon-instance/ImageDecoder.h:417
const char const uint8_t size_t unsigned int * width
Definition kodi-dev-kit/include/kodi/c-api/addon-instance/ImageDecoder.h:416
uint8_t type
Definition mysqldataset.cpp:891

Available tags

In addition to the Default Control Tags the following tags are available. Note that each tag is lower case only. This is important, as xml tags are case-sensitive.

Tag Description
videofilter The filter to use, see RetroPlayer.VideoFilter for supported values. If empty, the value of the RetroPlayer.VideoFilter info label is used.
stretchmode The stretch mode, see RetroPlayer.StretchMode for supported values. If empty, the value of the RetroPlayer.StretchMode info label is used.
rotation The rotation, in degrees counter-clockwise, see RetroPlayer.VideoRotation for supported values. If empty, the value of the RetroPlayer.VideoRotation info label is used.
v20 Skinning engine changes
pixels New tag added for rendering savestate pixels. Requires savestate v3 schema, introduced with the Savestate Manager in v20.
v23 Skinning engine changes
pixels Removed. Savestates no longer keep their video frame; show a savestate's thumbnail with ListItem.Art(screenshot) instead.

List item info

List item info can be used for all tag values. For example, if the control definition looks like:

<itemlayout width="444" height="250">
<control type="gamewindow">
<videofilter>$INFO[ListItem.Property(game.videofilter)]</videofilter>
<stretchmode>$INFO[ListItem.Property(game.stretchmode)]</stretchmode>
<rotation>$INFO[ListItem.Property(game.videorotation)]</rotation>
</control>
</itemlayout>

Static list items can be provided. Each gamewindow will inherit the properties:

<content>
<item>
<property name="game.videofilter">nearest</property>
<property name="game.stretchmode">normal</property>
<property name="game.videorotation">0</property>
</item>
</content>
enum const char * name
Definition addon_base.h:204

The in-game dialogs with a gamewindow control (GameVideoFilter, GameStretchMode, GameVideoRotation and InGameSaves) use a similar strategy with list items populated by core.


See also

Development: