// Since we don't want to rely on C++ or C99 for a proper boolean type, and make sure return semantics are perfectly clear ... ;)
#define SSNES_OK 1
#define SSNES_ERROR 0
#define SSNES_TRUE 1
#define SSNES_FALSE 0
#define SSNES_COLOR_FORMAT_XRGB1555 0
#define SSNES_COLOR_FORMAT_ARGB8888 1
typedefstructssnes_video_info
{
// Width of window.
// If fullscreen mode is requested, a width of 0 means the resolution of the desktop should be used.
unsignedwidth;
// Height of window.
// If fullscreen mode is requested, a height of 0 means the resolutiof the desktop should be used.
unsignedheight;
// If true, start the window in fullscreen mode.
intfullscreen;
// If true, VSync should be enabled.
intvsync;
// If true, the output image should have the aspect ratio as set in aspect_ratio.
intforce_aspect;
// Aspect ratio. Only takes effect if force_aspect is enabled.
floataspect_ratio;
// Requests that the image is smoothed, using bilinear filtering or otherwise.
// If this cannot be implemented efficiently, this can be disregarded.
// If smooth is false, nearest-neighbor scaling is requested.
intsmooth;
// input_scale defines the maximum size of the picture that will ever be used with the frame callback.
// This scale is relative to 256x256 size, so an input scale of 2 means you should allocate a texture or of 512x512. It is normally set to 2 due to the possibility of pseudo-hires on the SNES. CPU filters or otherwise might increase this value.
unsignedinput_scale;
// Defines the coloring format used of the input frame.
// XRGB1555 format is 16-bit and has byte ordering: 0RRRRRGGGGGBBBBB, in native endian.
// ARGB8888 is AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB, native endian. Alpha channel should be disregarded.
intcolor_format;
// If non-NULL, requests the use of an XML shader. Can be disregarded.
// If analog_x is true, we request an analog device to be polled. The returned value should be the delta of last frame and current frame in the X-axis.
intanalog_x;
// If analog_y is true, we request an analog device to be polled. The returned value should be the delta of last frame and current frame in the Y-axis.
intanalog_y;
// Keyboard key. The key values use the SDL keysyms, which probably need to be transformed to the native format.
unsignedshortkey;
// Joypad key.
unsignedshortjoykey;
// Joypad axis. Negative and positive axes are embedded into this variable.
// Updates frame on the screen. frame can be either XRGB1555 or ARGB32 format depending on rgb32 setting in ssnes_video_info_t. Pitch is the distance in bytes between two scanlines in memory. When msg is non-NULL, it's a message that should be displayed to the user.