Skip to content

Commit

Permalink
PS2 Input looks to be ready
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed Nov 9, 2018
1 parent 21587ba commit 8a0266c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion frontend/frontend_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static frontend_ctx_driver_t *frontend_ctx_drivers[] = {
&frontend_ctx_psp,
#endif
#if defined(PS2)
&frontend_ctx_ps2, //TODO: FJTRUJY
&frontend_ctx_ps2,
#endif
#if defined(_3DS)
&frontend_ctx_ctr,
Expand Down
10 changes: 9 additions & 1 deletion gfx/drivers/ps2_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void deinitTexture(GSTEXTURE *texture) {
static void *ps2_gfx_init(const video_info_t *video,
const input_driver_t **input, void **input_data)
{
*input = NULL;
void *ps2input = NULL;
*input_data = NULL;
(void)video;

Expand All @@ -100,6 +100,14 @@ static void *ps2_gfx_init(const video_info_t *video,
initGSGlobal(ps2);
initBackgroundTexture(ps2);

if (input && input_data)
{
settings_t *settings = config_get_ptr();
ps2input = input_ps2.init(settings->arrays.input_joypad_driver);
*input = ps2input ? &input_ps2 : NULL;
*input_data = ps2input;
}

return ps2;
}

Expand Down
2 changes: 1 addition & 1 deletion griffin/griffin.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ INPUT
#include "../input/drivers/psp_input.c"
#include "../input/drivers_joypad/psp_joypad.c"
#elif defined(PS2)
// #include "../input/drivers/ps2_input.c"
#include "../input/drivers/ps2_input.c"
// #include "../input/drivers_joypad/ps2_joypad.c"
#elif defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH) || defined(HAVE_COCOA_METAL)
#include "../input/drivers/cocoa_input.c"
Expand Down
9 changes: 0 additions & 9 deletions input/drivers/ps2_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,8 @@
#include <libretro.h>
#include <retro_miscellaneous.h>

#ifdef HAVE_KERNEL_PRX
#include "../../bootstrap/ps2/kernel_functions.h"
#endif

#include "../../defines/ps2_defines.h"

#include "../input_driver.h"

/* TODO/FIXME -
* fix game focus toggle */

typedef struct ps2_input
{
bool blocked;
Expand Down
2 changes: 1 addition & 1 deletion input/input_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static const input_driver_t *input_drivers[] = {
&input_psp,
#endif
#if defined(PS2)
// &input_ps2, TODO: FJTRUJY
&input_ps2,
#endif
#if defined(_3DS)
&input_ctr,
Expand Down

0 comments on commit 8a0266c

Please sign in to comment.