/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *   Mupen64plus - dummy_input.c                                           *
 *   Mupen64Plus homepage: https://mupen64plus.org/                        *
 *   Copyright (C) 2008 Scott Gorman (okaygo)                              *
 *   Copyright (C) 2009 Richard Goedeken                                   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#include <stdlib.h>

#include "api/m64p_types.h"
#include "dummy_input.h"
#include "plugin.h"

m64p_error dummyinput_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion,
                                       int *APIVersion, const char **PluginNamePtr, int *Capabilities)
{
    if (PluginType != NULL)
        *PluginType = M64PLUGIN_INPUT;

    if (PluginVersion != NULL)
        *PluginVersion = 0x00010000;

    if (APIVersion != NULL)
        *APIVersion = INPUT_API_VERSION;

    if (PluginNamePtr != NULL)
        *PluginNamePtr = "Mupen64Plus-NoInput";

    if (Capabilities != NULL)
        *Capabilities = 0;

    return M64ERR_SUCCESS;
}

void dummyinput_InitiateControllers (CONTROL_INFO ControlInfo)
{
    ControlInfo.Controls[0].Present = 1;
}

void dummyinput_GetKeys(int Control, BUTTONS * Keys )
{
    Keys->Value = 0x0000;
}

void dummyinput_ControllerCommand(int Control, unsigned char *Command)
{
}

void dummyinput_ReadController(int Control, unsigned char *Command)
{
}

int dummyinput_RomOpen(void)
{
    return 1;
}

void dummyinput_RomClosed(void)
{
}

void dummyinput_SDL_KeyDown(int keymod, int keysym)
{
}

void dummyinput_SDL_KeyUp(int keymod, int keysym)
{
}

void dummyinput_RenderCallback(void)
{
}

void dummyinput_SendVRUWord(uint16_t length, uint16_t *word, uint8_t lang)
{
}

void dummyinput_SetMicState(int state)
{
}

void dummyinput_ReadVRUResults(uint16_t *error_flags, uint16_t *num_results, uint16_t *mic_level, uint16_t *voice_level, uint16_t *voice_length, uint16_t *matches)
{
}

void dummyinput_ClearVRUWords(uint8_t lenght)
{
}

void dummyinput_SetVRUWordMask(uint8_t length, uint8_t *mask)
{
}
