More housekeeping in sdl controller stuff, remove stuff

that is not used and make static if it is only used in
ctrlssdl.cpp.
This commit is contained in:
riccardom 2010-05-09 22:35:48 +00:00
parent 960d3514be
commit fe0f471812
2 changed files with 7 additions and 36 deletions

View File

@ -77,24 +77,6 @@ const u16 default_joypad_cfg[NB_KEYS] =
0xFFFF // BOOST
};
const u16 plain_keyboard_cfg[NB_KEYS] =
{
'x', // A
'z', // B
'y', // select
'u', // start
'l', // Right
'j', // Left
'i', // Up
'k', // Down
'w', // R
'q', // L
's', // X
'a', // Y
'p', // DEBUG
'o' // BOOST
};
/* Load default joystick and keyboard configurations */
void load_default_config(const u16 kbCfg[])
{
@ -102,6 +84,12 @@ void load_default_config(const u16 kbCfg[])
memcpy(joypad_cfg, default_joypad_cfg, sizeof(joypad_cfg));
}
/* Set all buttons at once */
static void set_joy_keys(const u16 joyCfg[])
{
memcpy(joypad_cfg, joyCfg, sizeof(joypad_cfg));
}
/* Initialize joysticks */
BOOL init_joy( void) {
int i;
@ -148,18 +136,6 @@ BOOL init_joy( void) {
return joy_init_good;
}
/* Set all buttons at once */
void set_joy_keys(const u16 joyCfg[])
{
memcpy(joypad_cfg, joyCfg, sizeof(joypad_cfg));
}
/* Set all buttons at once */
void set_kb_keys(const u16 kbCfg[])
{
memcpy(keyboard_cfg, kbCfg, sizeof(keyboard_cfg));
}
/* Unload joysticks */
void uninit_joy( void)
{
@ -285,7 +261,7 @@ screen_to_touch_range( signed long scr, float size_ratio) {
}
/* Set mouse coordinates */
void set_mouse_coord(signed long x,signed long y)
static void set_mouse_coord(signed long x,signed long y)
{
if(x<0) x = 0; else if(x>255) x = 255;
if(y<0) y = 0; else if(y>192) y = 192;

View File

@ -26,7 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
//#include <pthread.h>
#include <SDL.h>
#include "MMU.h"
@ -81,8 +80,6 @@ struct mouse_status
};
extern mouse_status mouse;
void set_mouse_coord(signed long x,signed long y);
#endif // !GTK_UI
struct ctrls_event_config {
@ -99,8 +96,6 @@ struct ctrls_event_config {
void load_default_config(const u16 kbCfg[]);
BOOL init_joy( void);
void uninit_joy( void);
void set_joy_keys(const u16 joyCfg[]);
void set_kb_keys(const u16 kbCfg[]);
u16 get_joy_key(int index);
u16 get_set_joy_key(int index);
void update_keypad(u16 keys);