451ab91e |
1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
2 | * Mupen64plus - dummy_input.c * |
3 | * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ * |
4 | * Copyright (C) 2008 Scott Gorman (okaygo) * |
5 | * Copyright (C) 2009 Richard Goedeken * |
6 | * * |
7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * |
11 | * * |
12 | * This program is distributed in the hope that it will be useful, * |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
15 | * GNU General Public License for more details. * |
16 | * * |
17 | * You should have received a copy of the GNU General Public License * |
18 | * along with this program; if not, write to the * |
19 | * Free Software Foundation, Inc., * |
20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * |
21 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
22 | |
23 | #include <stdlib.h> |
24 | |
25 | #include "api/m64p_types.h" |
26 | #include "plugin.h" |
27 | #include "dummy_input.h" |
28 | |
29 | m64p_error dummyinput_PluginGetVersion(m64p_plugin_type *PluginType, int *PluginVersion, |
30 | int *APIVersion, const char **PluginNamePtr, int *Capabilities) |
31 | { |
32 | if (PluginType != NULL) |
33 | *PluginType = M64PLUGIN_INPUT; |
34 | |
35 | if (PluginVersion != NULL) |
36 | *PluginVersion = 0x00010000; |
37 | |
38 | if (APIVersion != NULL) |
39 | *APIVersion = INPUT_API_VERSION; |
40 | |
41 | if (PluginNamePtr != NULL) |
42 | *PluginNamePtr = "Mupen64Plus-NoInput"; |
43 | |
44 | if (Capabilities != NULL) |
45 | *Capabilities = 0; |
46 | |
47 | return M64ERR_SUCCESS; |
48 | } |
49 | |
50 | void dummyinput_InitiateControllers (CONTROL_INFO ControlInfo) |
51 | { |
52 | ControlInfo.Controls[0].Present = 1; |
53 | } |
54 | |
55 | void dummyinput_GetKeys(int Control, BUTTONS * Keys ) |
56 | { |
57 | Keys->Value = 0x0000; |
58 | } |
59 | |
60 | void dummyinput_ControllerCommand(int Control, unsigned char *Command) |
61 | { |
62 | } |
63 | |
64 | void dummyinput_ReadController(int Control, unsigned char *Command) |
65 | { |
66 | } |
67 | |
68 | int dummyinput_RomOpen(void) |
69 | { |
70 | return 1; |
71 | } |
72 | |
73 | void dummyinput_RomClosed(void) |
74 | { |
75 | } |
76 | |
77 | void dummyinput_SDL_KeyDown(int keymod, int keysym) |
78 | { |
79 | } |
80 | |
81 | void dummyinput_SDL_KeyUp(int keymod, int keysym) |
82 | { |
83 | } |
84 | |
85 | |