mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 06:40:18 +00:00
Move code to input_config_reset
This commit is contained in:
parent
d66aff8fbd
commit
3b3b008614
@ -27,8 +27,6 @@
|
||||
|
||||
#include "input/input_driver.h"
|
||||
|
||||
#include "config.def.keybinds.h"
|
||||
|
||||
enum video_driver_enum
|
||||
{
|
||||
VIDEO_GL = 0,
|
||||
|
@ -1156,15 +1156,6 @@ static void config_set_defaults(void)
|
||||
*settings->cheevos.password = '\0';
|
||||
#endif
|
||||
|
||||
retro_assert(sizeof(settings->input.binds[0]) >= sizeof(retro_keybinds_1));
|
||||
retro_assert(sizeof(settings->input.binds[1]) >= sizeof(retro_keybinds_rest));
|
||||
|
||||
memcpy(input_config_get_binds(0), retro_keybinds_1, sizeof(retro_keybinds_1));
|
||||
|
||||
for (i = 1; i < MAX_USERS; i++)
|
||||
memcpy(input_config_get_binds(i), retro_keybinds_rest,
|
||||
sizeof(retro_keybinds_rest));
|
||||
|
||||
input_config_reset();
|
||||
input_remapping_set_defaults();
|
||||
input_autoconfigure_reset();
|
||||
|
@ -23,11 +23,15 @@
|
||||
#include <file/file_path.h>
|
||||
#include <file/config_file.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <retro_assert.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "../config.def.h"
|
||||
#include "../config.def.keybinds.h"
|
||||
|
||||
#include "input_config.h"
|
||||
#include "input_keymaps.h"
|
||||
#include "input_remapping.h"
|
||||
@ -582,6 +586,16 @@ int32_t input_config_get_vid(unsigned port)
|
||||
void input_config_reset(void)
|
||||
{
|
||||
unsigned i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
retro_assert(sizeof(settings->input.binds[0]) >= sizeof(retro_keybinds_1));
|
||||
retro_assert(sizeof(settings->input.binds[1]) >= sizeof(retro_keybinds_rest));
|
||||
|
||||
memcpy(input_config_get_binds(0), retro_keybinds_1, sizeof(retro_keybinds_1));
|
||||
|
||||
for (i = 1; i < MAX_USERS; i++)
|
||||
memcpy(input_config_get_binds(i), retro_keybinds_rest,
|
||||
sizeof(retro_keybinds_rest));
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
|
@ -35,6 +35,9 @@
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "config.def.h"
|
||||
#include "config.def.keybinds.h"
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include <sdk_version.h>
|
||||
|
||||
|
@ -23,6 +23,9 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "config.def.h"
|
||||
#include "config.def.keybinds.h"
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_driver.h"
|
||||
#include "menu/widgets/menu_input_dialog.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user