include/SDL_test_compare.h
author Steven M. Vascellaro <svascellaro@gmail.com>
Mon, 22 Oct 2018 10:55:18 -0400
changeset 12379 5dc13016cf34
parent 11811 5d94cb6b24d3
child 12503 806492103856
permissions -rw-r--r--
joystick: Add Linux mappings for "Xbox One Wireless Controller (Model 1708)"

Adds controller bindings to support the "Xbox One Wireless Controller
(Model 1708)" on Linux. The Model 1708 was released in 2016 alongside the
Xbox One S. It is the current model being sold by Microsoft as of writing.
(October 22, 2018)
aschiffler@6763
     1
/*
aschiffler@6763
     2
  Simple DirectMedia Layer
slouken@11811
     3
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
aschiffler@6763
     4
aschiffler@6763
     5
  This software is provided 'as-is', without any express or implied
aschiffler@6763
     6
  warranty.  In no event will the authors be held liable for any damages
aschiffler@6763
     7
  arising from the use of this software.
aschiffler@6763
     8
aschiffler@6763
     9
  Permission is granted to anyone to use this software for any purpose,
aschiffler@6763
    10
  including commercial applications, and to alter it and redistribute it
aschiffler@6763
    11
  freely, subject to the following restrictions:
aschiffler@6763
    12
aschiffler@6763
    13
  1. The origin of this software must not be misrepresented; you must not
aschiffler@6763
    14
     claim that you wrote the original software. If you use this software
aschiffler@6763
    15
     in a product, an acknowledgment in the product documentation would be
aschiffler@6763
    16
     appreciated but is not required.
aschiffler@6763
    17
  2. Altered source versions must be plainly marked as such, and must not be
aschiffler@6763
    18
     misrepresented as being the original software.
aschiffler@6763
    19
  3. This notice may not be removed or altered from any source distribution.
aschiffler@6763
    20
*/
aschiffler@6763
    21
aschiffler@6763
    22
/**
aschiffler@6763
    23
 *  \file SDL_test_compare.h
slouken@7191
    24
 *
aschiffler@6763
    25
 *  Include file for SDL test framework.
aschiffler@6763
    26
 *
aschiffler@6763
    27
 *  This code is a part of the SDL2_test library, not the main SDL library.
aschiffler@6763
    28
 */
aschiffler@6763
    29
slouken@7191
    30
/*
aschiffler@6763
    31
aschiffler@6763
    32
 Defines comparison functions (i.e. for surfaces).
slouken@7191
    33
aschiffler@6763
    34
*/
aschiffler@6763
    35
slouken@10638
    36
#ifndef SDL_test_compare_h_
slouken@10638
    37
#define SDL_test_compare_h_
aschiffler@6763
    38
aschiffler@6763
    39
#include "SDL.h"
aschiffler@6772
    40
aschiffler@6763
    41
#include "SDL_test_images.h"
aschiffler@6763
    42
aschiffler@6763
    43
#include "begin_code.h"
aschiffler@6763
    44
/* Set up for C function definitions, even when using C++ */
aschiffler@6763
    45
#ifdef __cplusplus
aschiffler@6763
    46
extern "C" {
aschiffler@6763
    47
#endif
aschiffler@6763
    48
aschiffler@6763
    49
/**
aschiffler@6763
    50
 * \brief Compares a surface and with reference image data for equality
aschiffler@6763
    51
 *
aschiffler@6772
    52
 * \param surface Surface used in comparison
aschiffler@6772
    53
 * \param referenceSurface Test Surface used in comparison
aschiffler@9254
    54
 * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.
aschiffler@6763
    55
 *
aschiffler@9254
    56
 * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
aschiffler@6763
    57
 */
aschiffler@6772
    58
int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
slouken@7191
    59
aschiffler@6763
    60
aschiffler@6763
    61
/* Ends C function definitions when using C++ */
aschiffler@6763
    62
#ifdef __cplusplus
aschiffler@6763
    63
}
aschiffler@6763
    64
#endif
aschiffler@6763
    65
#include "close_code.h"
aschiffler@6763
    66
slouken@10638
    67
#endif /* SDL_test_compare_h_ */
aschiffler@6763
    68
aschiffler@6763
    69
/* vi: set ts=4 sw=4 expandtab: */