mirror of https://github.com/mgba-emu/mgba.git
GB: Add input description file
This commit is contained in:
parent
e758f232fa
commit
7611913d65
|
@ -0,0 +1,29 @@
|
|||
/* Copyright (c) 2013-2019 Jeffrey Pfau
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#ifndef GB_INPUT_H
|
||||
#define GB_INPUT_H
|
||||
|
||||
#include <mgba-util/common.h>
|
||||
|
||||
CXX_GUARD_START
|
||||
|
||||
#include <mgba/core/input.h>
|
||||
|
||||
enum GBKey {
|
||||
GB_KEY_A = 0,
|
||||
GB_KEY_B = 1,
|
||||
GB_KEY_SELECT = 2,
|
||||
GB_KEY_START = 3,
|
||||
GB_KEY_RIGHT = 4,
|
||||
GB_KEY_LEFT = 5,
|
||||
GB_KEY_UP = 6,
|
||||
GB_KEY_DOWN = 7,
|
||||
GB_KEY_MAX,
|
||||
};
|
||||
|
||||
CXX_GUARD_END
|
||||
|
||||
#endif
|
|
@ -4,6 +4,7 @@ set(SOURCE_FILES
|
|||
cheats.c
|
||||
core.c
|
||||
gb.c
|
||||
input.c
|
||||
io.c
|
||||
mbc.c
|
||||
memory.c
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* Copyright (c) 2013-2019 Jeffrey Pfau
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include <mgba/internal/gb/input.h>
|
||||
|
||||
#include <mgba/gb/interface.h>
|
||||
|
||||
const struct mInputPlatformInfo GBInputInfo = {
|
||||
.platformName = "gb",
|
||||
.keyId = (const char*[]) {
|
||||
"A",
|
||||
"B",
|
||||
"Select",
|
||||
"Start",
|
||||
"Right",
|
||||
"Left",
|
||||
"Up",
|
||||
"Down",
|
||||
},
|
||||
.nKeys = GB_KEY_MAX,
|
||||
.hat = {
|
||||
.up = GB_KEY_UP,
|
||||
.left = GB_KEY_LEFT,
|
||||
.down = GB_KEY_DOWN,
|
||||
.right = GB_KEY_RIGHT
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue