Cleanups
This commit is contained in:
parent
36c36aa558
commit
8e2818bbeb
|
@ -126,7 +126,8 @@ const char* config_get_joypad_driver_options(void)
|
||||||
*
|
*
|
||||||
* Returns: joypad driver if found, otherwise NULL.
|
* Returns: joypad driver if found, otherwise NULL.
|
||||||
**/
|
**/
|
||||||
const input_device_driver_t *input_joypad_init_driver(const char *ident, void *data)
|
const input_device_driver_t *input_joypad_init_driver(
|
||||||
|
const char *ident, void *data)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
if (!ident || !*ident)
|
if (!ident || !*ident)
|
||||||
|
|
|
@ -30,7 +30,8 @@ struct input_keyboard_line
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
/** Line complete callback.
|
/** Line complete callback.
|
||||||
* Calls back after return is pressed with the completed line.
|
* Calls back after return is
|
||||||
|
* pressed with the completed line.
|
||||||
* Line can be NULL.
|
* Line can be NULL.
|
||||||
**/
|
**/
|
||||||
input_keyboard_line_complete_t cb;
|
input_keyboard_line_complete_t cb;
|
||||||
|
@ -126,7 +127,8 @@ bool input_keyboard_line_event(
|
||||||
{
|
{
|
||||||
if (state->ptr)
|
if (state->ptr)
|
||||||
{
|
{
|
||||||
memmove(state->buffer + state->ptr - 1, state->buffer + state->ptr,
|
memmove(state->buffer + state->ptr - 1,
|
||||||
|
state->buffer + state->ptr,
|
||||||
state->size - state->ptr + 1);
|
state->size - state->ptr + 1);
|
||||||
state->ptr--;
|
state->ptr--;
|
||||||
state->size--;
|
state->size--;
|
||||||
|
@ -141,7 +143,8 @@ bool input_keyboard_line_event(
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
memmove(newbuf + state->ptr + 1,
|
memmove(newbuf + state->ptr + 1,
|
||||||
newbuf + state->ptr, state->size - state->ptr + 1);
|
newbuf + state->ptr,
|
||||||
|
state->size - state->ptr + 1);
|
||||||
newbuf[state->ptr] = c;
|
newbuf[state->ptr] = c;
|
||||||
state->ptr++;
|
state->ptr++;
|
||||||
state->size++;
|
state->size++;
|
||||||
|
@ -165,7 +168,8 @@ bool input_keyboard_line_event(
|
||||||
*
|
*
|
||||||
* Returns: pointer to string.
|
* Returns: pointer to string.
|
||||||
**/
|
**/
|
||||||
const char **input_keyboard_line_get_buffer(const input_keyboard_line_t *state)
|
const char **input_keyboard_line_get_buffer(
|
||||||
|
const input_keyboard_line_t *state)
|
||||||
{
|
{
|
||||||
return (const char**)&state->buffer;
|
return (const char**)&state->buffer;
|
||||||
}
|
}
|
||||||
|
@ -264,7 +268,8 @@ void input_keyboard_event(bool down, unsigned code,
|
||||||
switch (device)
|
switch (device)
|
||||||
{
|
{
|
||||||
case RETRO_DEVICE_POINTER:
|
case RETRO_DEVICE_POINTER:
|
||||||
if (!input_keyboard_line_event(g_keyboard_line, (code != 0x12d) ? (char)code : character))
|
if (!input_keyboard_line_event(g_keyboard_line,
|
||||||
|
(code != 0x12d) ? (char)code : character))
|
||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -43,7 +43,7 @@ bool input_remapping_load_file(void *data, const char *path)
|
||||||
|
|
||||||
for (i = 0; i < MAX_USERS; i++)
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
{
|
{
|
||||||
char buf[64] = {0};
|
char buf[64];
|
||||||
char key_ident[RARCH_FIRST_CUSTOM_BIND + 4][128] = {{0}};
|
char key_ident[RARCH_FIRST_CUSTOM_BIND + 4][128] = {{0}};
|
||||||
char key_strings[RARCH_FIRST_CUSTOM_BIND + 4][128] =
|
char key_strings[RARCH_FIRST_CUSTOM_BIND + 4][128] =
|
||||||
{ "b", "y", "select", "start",
|
{ "b", "y", "select", "start",
|
||||||
|
|
Loading…
Reference in New Issue