(Wii) testing code for core switching

This commit is contained in:
Toad King 2012-07-30 23:00:20 -04:00
parent 8f7b406611
commit fa4898757c
3 changed files with 28 additions and 0 deletions

View File

@ -44,6 +44,9 @@ FILE * log_fp;
static uint16_t menu_framebuf[RGUI_WIDTH * RGUI_HEIGHT];
char app_dir[PATH_MAX];
struct retro_system_info wii_core_info;
static const struct retro_keybind _wii_nav_binds[] = {
{ 0, 0, 0, WII_GC_UP | WII_GC_LSTICK_UP | WII_GC_RSTICK_UP | WII_CLASSIC_UP | WII_CLASSIC_LSTICK_UP | WII_CLASSIC_RSTICK_UP | WII_WIIMOTE_UP | WII_NUNCHUK_UP, 0 },
{ 0, 0, 0, WII_GC_DOWN | WII_GC_LSTICK_DOWN | WII_GC_RSTICK_DOWN | WII_CLASSIC_DOWN | WII_CLASSIC_LSTICK_DOWN | WII_CLASSIC_RSTICK_DOWN | WII_WIIMOTE_DOWN | WII_NUNCHUK_DOWN, 0 },
@ -214,6 +217,7 @@ int main(void)
#endif
fatInitDefault();
getcwd(app_dir, sizeof(app_dir));
get_environment_settings();
@ -228,6 +232,9 @@ int main(void)
config_set_defaults();
retro_get_system_info(&wii_core_info);
RARCH_LOG("Core: %s\n", wii_core_info.library_name);
g_settings.audio.rate_control = true;
g_settings.audio.rate_control_delta = 0.006;
g_console.block_config_read = true;

View File

@ -31,6 +31,8 @@
#define TERM_WIDTH (((RGUI_WIDTH - TERM_START_X - 15) / (FONT_WIDTH_STRIDE)))
#define TERM_HEIGHT (((RGUI_HEIGHT - TERM_START_Y - 15) / (FONT_HEIGHT_STRIDE)))
extern char app_dir[PATH_MAX];
struct rgui_handle
{
uint16_t *frame_buf;
@ -372,6 +374,23 @@ static void rgui_settings_toggle_setting(rgui_file_type_t setting, rgui_action_t
rarch_settings_change(S_AUDIO_CONTROL_RATE_INCREMENT);
break;
case RGUI_SETTINGS_CORE:
{
// !!JUST FOR TESTING!!
char boot_dol[PATH_MAX];
char temp_dol[PATH_MAX];
char temp2_dol[PATH_MAX];
snprintf(boot_dol, sizeof(boot_dol), "%s%s", app_dir, "boot.dol");
snprintf(temp_dol, sizeof(temp_dol), "%s%s", app_dir, "temp.dol");
snprintf(temp2_dol, sizeof(temp2_dol), "%s%s", app_dir, "temp2.dol");
rename(boot_dol, temp2_dol);
rename(temp_dol, boot_dol);
rename(temp2_dol, temp_dol);
break;
}
// controllers
case RGUI_SETTINGS_BIND_DEVICE:
g_settings.input.device[port] += RARCH_DEVICE_LAST;
@ -430,6 +449,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
RGUI_MENU_ITEM("Hardware filtering", RGUI_SETTINGS_VIDEO_FILTER);
RGUI_MENU_ITEM("Mute Audio", RGUI_SETTINGS_AUDIO_MUTE);
RGUI_MENU_ITEM("Audio Control Rate", RGUI_SETTINGS_AUDIO_CONTROL_RATE);
//RGUI_MENU_ITEM("Core", RGUI_SETTINGS_CORE);
RGUI_MENU_ITEM("Controller #1 Config", RGUI_SETTINGS_CONTROLLER_1);
RGUI_MENU_ITEM("Controller #2 Config", RGUI_SETTINGS_CONTROLLER_2);
RGUI_MENU_ITEM("Controller #3 Config", RGUI_SETTINGS_CONTROLLER_3);

View File

@ -36,6 +36,7 @@ typedef enum
RGUI_SETTINGS_VIDEO_FILTER,
RGUI_SETTINGS_AUDIO_MUTE,
RGUI_SETTINGS_AUDIO_CONTROL_RATE,
RGUI_SETTINGS_CORE,
RGUI_SETTINGS_CONTROLLER_1,
RGUI_SETTINGS_CONTROLLER_2,
RGUI_SETTINGS_CONTROLLER_3,