mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
First dummy input implementation
This commit is contained in:
parent
8b65c92f1f
commit
e22b24b81a
5 changed files with 317 additions and 12 deletions
41
platform/ps2/emu.c
Normal file
41
platform/ps2/emu.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include <ps2_joystick_driver.h>
|
||||
#include <ps2_audio_driver.h>
|
||||
#include <libpad.h>
|
||||
|
||||
#include "in_ps2.h"
|
||||
#include "../libpicofe/input.h"
|
||||
#include "../common/input_pico.h"
|
||||
#include "../common/emu.h"
|
||||
|
||||
static struct in_default_bind in_ps2_defbinds[] =
|
||||
{
|
||||
{ PAD_UP, IN_BINDTYPE_PLAYER12, GBTN_UP },
|
||||
{ PAD_DOWN, IN_BINDTYPE_PLAYER12, GBTN_DOWN },
|
||||
{ PAD_LEFT, IN_BINDTYPE_PLAYER12, GBTN_LEFT },
|
||||
{ PAD_RIGHT, IN_BINDTYPE_PLAYER12, GBTN_RIGHT },
|
||||
{ PAD_SQUARE, IN_BINDTYPE_PLAYER12, GBTN_A },
|
||||
{ PAD_CROSS, IN_BINDTYPE_PLAYER12, GBTN_B },
|
||||
{ PAD_CIRCLE, IN_BINDTYPE_PLAYER12, GBTN_C },
|
||||
{ PAD_START, IN_BINDTYPE_PLAYER12, GBTN_START },
|
||||
{ PAD_TRIANGLE, IN_BINDTYPE_EMU, PEVB_SWITCH_RND },
|
||||
{ PAD_L1, IN_BINDTYPE_EMU, PEVB_STATE_SAVE },
|
||||
{ PAD_R1, IN_BINDTYPE_EMU, PEVB_STATE_LOAD },
|
||||
{ PAD_SELECT, IN_BINDTYPE_EMU, PEVB_MENU },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
void plat_init(void)
|
||||
{
|
||||
init_joystick_driver(false);
|
||||
in_ps2_init(in_ps2_defbinds);
|
||||
in_probe();
|
||||
init_audio_driver();
|
||||
// plat_get_data_dir(rom_fname_loaded, sizeof(rom_fname_loaded));
|
||||
}
|
||||
|
||||
void plat_finish(void) {
|
||||
deinit_audio_driver();
|
||||
deinit_joystick_driver(false);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue