diff --git a/apple/OSX/settings.m b/apple/OSX/settings.m index 6b20a58357..939fe4765c 100644 --- a/apple/OSX/settings.m +++ b/apple/OSX/settings.m @@ -52,7 +52,10 @@ static uint32_t key_id_for_name(const char* name) static const char* get_input_config_key(const rarch_setting_t* setting, const char* type) { static char buffer[32]; - snprintf(buffer, 32, "input_player%d_%s%c%s", setting->input_player, setting->name, type ? '_' : '\0', type); + if (setting->input_player) + snprintf(buffer, 32, "input_player%d_%s%c%s", setting->input_player, setting->name, type ? '_' : '\0', type); + else + snprintf(buffer, 32, "input_%s%c%s", setting->name, type ? '_' : '\0', type); return buffer; } @@ -127,6 +130,7 @@ static const char* get_axis_name(const rarch_setting_t* setting) case ST_PATH: self.stringValue = @((const char*)aSetting->value); break; case ST_BOOL: self.booleanValue = *(bool*)aSetting->value; break; case ST_BIND: [self updateInputString]; break; + default: break; } } @@ -444,6 +448,7 @@ static const char* get_axis_name(const rarch_setting_t* setting) case ST_PATH: s = [outlineView makeViewWithIdentifier:@"RAPathSetting" owner:nil]; break; case ST_STRING: s = [outlineView makeViewWithIdentifier:@"RAStringSetting" owner:nil]; break; case ST_BIND: s = [outlineView makeViewWithIdentifier:@"RABindSetting" owner:nil]; break; + default: break; } s.setting = setting; return s; diff --git a/apple/common/RAGameView.m b/apple/common/RAGameView.m index 3dfb76a0d0..8fec390435 100644 --- a/apple/common/RAGameView.m +++ b/apple/common/RAGameView.m @@ -17,6 +17,7 @@ #include "rarch_wrapper.h" #include "general.h" +#include "gfx/gfx_common.h" #ifdef IOS diff --git a/apple/common/setting_data.h b/apple/common/setting_data.h index 3fcac23459..0f91eb5825 100644 --- a/apple/common/setting_data.h +++ b/apple/common/setting_data.h @@ -64,6 +64,7 @@ const rarch_setting_t setting_data[] = /***********/ /* DRIVERS */ /***********/ +#if 0 START_GROUP("Drivers") START_SUB_GROUP("Drivers") CONFIG_STRING(g_settings.video.driver, "video_driver", "Video Driver") @@ -73,6 +74,7 @@ const rarch_setting_t setting_data[] = CONFIG_STRING(g_settings.input.joypad_driver, "input_joypad_driver", "Joypad Driver") END_SUB_GROUP() END_GROUP() +#endif /*********/ /* PATHS */ @@ -118,6 +120,82 @@ const rarch_setting_t setting_data[] = END_SUB_GROUP() END_GROUP() + /*********/ + /* VIDEO */ + /*********/ + START_GROUP("Video") + START_SUB_GROUP("Monitor") + CONFIG_INT(g_settings.video.monitor_index, "video_monitor_index", "Monitor Index") + CONFIG_BOOL(g_settings.video.fullscreen, "video_fullscreen", "Use Fullscreen mode") // if (!g_extern.force_fullscreen) + CONFIG_BOOL(g_settings.video.windowed_fullscreen, "video_windowed_fullscreen", "Windowed Fullscreen Mode") + CONFIG_INT(g_settings.video.fullscreen_x, "video_fullscreen_x", "Fullscreen Width") + CONFIG_INT(g_settings.video.fullscreen_y, "video_fullscreen_y", "Fullscreen Height") + CONFIG_FLOAT(g_settings.video.refresh_rate, "video_refresh_rate", "Refresh Rate") + END_SUB_GROUP() + +#if 0 + /* Video: Window Manager */ + START_SUB_GROUP("Window Manager") + CONFIG_BOOL(g_settings.video.disable_composition, "video_disable_composition", "Disable WM Composition") + END_SUB_GROUP() +#endif + + START_SUB_GROUP("Aspect") + CONFIG_BOOL(g_settings.video.force_aspect, "video_force_aspect", "Force aspect ratio") + CONFIG_FLOAT(g_settings.video.aspect_ratio, "video_aspect_ratio", "Aspect Ratio") + CONFIG_BOOL(g_settings.video.aspect_ratio_auto, "video_aspect_ratio_auto", "Use Auto Aspect Ratio") + CONFIG_INT(g_settings.video.aspect_ratio_idx, "aspect_ratio_index", "Aspect Ratio Index") + END_SUB_GROUP() + + START_SUB_GROUP("Scaling") + CONFIG_FLOAT(g_settings.video.xscale, "video_xscale", "X Scale") + CONFIG_FLOAT(g_settings.video.yscale, "video_yscale", "Y Scale") + CONFIG_BOOL(g_settings.video.scale_integer, "video_scale_integer", "Force integer scaling") + + CONFIG_INT(g_extern.console.screen.viewports.custom_vp.x, "custom_viewport_x", "Custom Viewport X") + CONFIG_INT(g_extern.console.screen.viewports.custom_vp.y, "custom_viewport_y", "Custom Viewport Y") + CONFIG_INT(g_extern.console.screen.viewports.custom_vp.width, "custom_viewport_width", "Custom Viewport Width") + CONFIG_INT(g_extern.console.screen.viewports.custom_vp.height, "custom_viewport_height", "Custom Viewport Height") + + CONFIG_BOOL(g_settings.video.smooth, "video_smooth", "Use bilinear filtering") + END_SUB_GROUP() + + START_SUB_GROUP("Shader") + CONFIG_BOOL(g_settings.video.shader_enable, "video_shader_enable", "Enable Shaders") + CONFIG_PATH(g_settings.video.shader_dir, "video_shader_dir", "Shader Directory") + CONFIG_PATH(g_settings.video.shader_path, "video_shader", "Shader") + END_SUB_GROUP() + + START_SUB_GROUP("Sync") + CONFIG_BOOL(g_settings.video.threaded, "video_threaded", "Use threaded video") + CONFIG_BOOL(g_settings.video.vsync, "video_vsync", "Use VSync") + CONFIG_BOOL(g_settings.video.hard_sync, "video_hard_sync", "Use OpenGL Hard Sync") + CONFIG_INT(g_settings.video.hard_sync_frames, "video_hard_sync_frames", "Number of Hard Sync frames") // 0 - 3 + END_SUB_GROUP() + + START_SUB_GROUP("Misc") + CONFIG_BOOL(g_settings.video.post_filter_record, "video_post_filter_record", "Post filter record") + CONFIG_BOOL(g_settings.video.gpu_record, "video_gpu_record", "GPU Record") + CONFIG_BOOL(g_settings.video.gpu_screenshot, "video_gpu_screenshot", "GPU Screenshot") + CONFIG_BOOL(g_settings.video.allow_rotate, "video_allow_rotate", "Allow rotation") + CONFIG_BOOL(g_settings.video.crop_overscan, "video_crop_overscan", "Crop Overscan") + + #ifdef HAVE_DYLIB + CONFIG_PATH(g_settings.video.filter_path, "video_filter", "Software filter"), + #endif + END_SUB_GROUP() + + START_SUB_GROUP("Messages") + CONFIG_PATH(g_settings.video.font_path, "video_font_path", "Font Path") + CONFIG_FLOAT(g_settings.video.font_size, "video_font_size", "Font Size") + CONFIG_BOOL(g_settings.video.font_enable, "video_font_enable", "Font Enable") + CONFIG_BOOL(g_settings.video.font_scale, "video_font_scale", "Font Scale") + CONFIG_FLOAT(g_settings.video.msg_pos_x, "video_message_pos_x", "Message X Position") + CONFIG_FLOAT(g_settings.video.msg_pos_y, "video_message_pos_y", "Message Y Position") + /* message color */ + END_SUB_GROUP() + END_GROUP() + /*********/ /* AUDIO */ /*********/ @@ -181,106 +259,66 @@ const rarch_setting_t setting_data[] = #endif END_SUB_GROUP() + START_SUB_GROUP("Meta Keys") + CONFIG_BIND(g_settings.input.binds[0][RARCH_FAST_FORWARD_KEY], 0, "toggle_fast_forward", "Fast forward toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_FAST_FORWARD_HOLD_KEY], 0, "hold_fast_forward", "Fast forward hold") + CONFIG_BIND(g_settings.input.binds[0][RARCH_LOAD_STATE_KEY], 0, "load_state", "Load state") + CONFIG_BIND(g_settings.input.binds[0][RARCH_SAVE_STATE_KEY], 0, "save_state", "Save state") + CONFIG_BIND(g_settings.input.binds[0][RARCH_FULLSCREEN_TOGGLE_KEY], 0, "toggle_fullscreen", "Fullscreen toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_QUIT_KEY], 0, "exit_emulator", "Quit RetroArch") + CONFIG_BIND(g_settings.input.binds[0][RARCH_STATE_SLOT_PLUS], 0, "state_slot_increase", "Savestate slot +") + CONFIG_BIND(g_settings.input.binds[0][RARCH_STATE_SLOT_MINUS], 0, "state_slot_decrease", "Savestate slot -") + CONFIG_BIND(g_settings.input.binds[0][RARCH_REWIND], 0, "rewind", "Rewind") + CONFIG_BIND(g_settings.input.binds[0][RARCH_MOVIE_RECORD_TOGGLE], 0, "movie_record_toggle", "Movie record toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_PAUSE_TOGGLE], 0, "pause_toggle", "Pause toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_FRAMEADVANCE], 0, "frame_advance", "Frameadvance") + CONFIG_BIND(g_settings.input.binds[0][RARCH_RESET], 0, "reset", "Reset game") + CONFIG_BIND(g_settings.input.binds[0][RARCH_SHADER_NEXT], 0, "shader_next", "Next shader") + CONFIG_BIND(g_settings.input.binds[0][RARCH_SHADER_PREV], 0, "shader_prev", "Previous shader") + CONFIG_BIND(g_settings.input.binds[0][RARCH_CHEAT_INDEX_PLUS], 0, "cheat_index_plus", "Cheat index +") + CONFIG_BIND(g_settings.input.binds[0][RARCH_CHEAT_INDEX_MINUS], 0, "cheat_index_minus", "Cheat index -") + CONFIG_BIND(g_settings.input.binds[0][RARCH_CHEAT_TOGGLE], 0, "cheat_toggle", "Cheat toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_SCREENSHOT], 0, "screenshot", "Take screenshot") + CONFIG_BIND(g_settings.input.binds[0][RARCH_DSP_CONFIG], 0, "dsp_config", "DSP config") + CONFIG_BIND(g_settings.input.binds[0][RARCH_MUTE], 0, "audio_mute", "Audio mute toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_NETPLAY_FLIP], 0, "netplay_flip_players", "Netplay flip players") + CONFIG_BIND(g_settings.input.binds[0][RARCH_SLOWMOTION], 0, "slowmotion", "Slow motion") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ENABLE_HOTKEY], 0, "enable_hotkey", "Enable hotkeys") + CONFIG_BIND(g_settings.input.binds[0][RARCH_VOLUME_UP], 0, "volume_up", "Volume +") + CONFIG_BIND(g_settings.input.binds[0][RARCH_VOLUME_DOWN], 0, "volume_down", "Volume -") + CONFIG_BIND(g_settings.input.binds[0][RARCH_OVERLAY_NEXT], 0, "overlay_next", "Overlay next") + CONFIG_BIND(g_settings.input.binds[0][RARCH_DISK_EJECT_TOGGLE], 0, "disk_eject_toggle", "Disk eject toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_DISK_NEXT], 0, "disk_next", "Disk next") + CONFIG_BIND(g_settings.input.binds[0][RARCH_GRAB_MOUSE_TOGGLE], 0, "grab_mouse_toggle", "Grab mouse toggle") + CONFIG_BIND(g_settings.input.binds[0][RARCH_MENU_TOGGLE], 0, "menu_toggle", "RGUI menu toggle") + END_SUB_GROUP() + START_SUB_GROUP("Player 1") - CONFIG_BIND(g_settings.input.binds[0][ 0], 1, "b", "B button (down)") - CONFIG_BIND(g_settings.input.binds[0][ 1], 1, "y", "Y button (left)") - CONFIG_BIND(g_settings.input.binds[0][ 2], 1, "select", "Select button") - CONFIG_BIND(g_settings.input.binds[0][ 3], 1, "start", "Start button") - CONFIG_BIND(g_settings.input.binds[0][ 4], 1, "up", "Up D-pad") - CONFIG_BIND(g_settings.input.binds[0][ 5], 1, "down", "Down D-pad") - CONFIG_BIND(g_settings.input.binds[0][ 6], 1, "left", "Left D-pad") - CONFIG_BIND(g_settings.input.binds[0][ 7], 1, "right", "Right D-pad") - CONFIG_BIND(g_settings.input.binds[0][ 8], 1, "a", "A button (right)") - CONFIG_BIND(g_settings.input.binds[0][ 9], 1, "x", "X button (top)") - CONFIG_BIND(g_settings.input.binds[0][10], 1, "l", "L button (left shoulder)") - CONFIG_BIND(g_settings.input.binds[0][11], 1, "r", "R button (right shoulder)") - CONFIG_BIND(g_settings.input.binds[0][12], 1, "l2", "L2 button (left shoulder #2)") - CONFIG_BIND(g_settings.input.binds[0][13], 1, "r2", "R2 button (right shoulder #2)") - CONFIG_BIND(g_settings.input.binds[0][14], 1, "l3", "L3 button (left analog button)") - CONFIG_BIND(g_settings.input.binds[0][15], 1, "r3", "R3 button (right analog button)") - CONFIG_BIND(g_settings.input.binds[0][16], 1, "turbo", "Turbo enable") - CONFIG_BIND(g_settings.input.binds[0][17], 1, "l_x_plus", "Left analog X+ (right)") - CONFIG_BIND(g_settings.input.binds[0][18], 1, "l_x_minus", "Left analog X- (left)") - CONFIG_BIND(g_settings.input.binds[0][19], 1, "l_y_plus", "Left analog Y+ (down)") - CONFIG_BIND(g_settings.input.binds[0][20], 1, "l_y_minus", "Left analog Y- (up)") - CONFIG_BIND(g_settings.input.binds[0][21], 1, "r_x_plus", "Right analog X+ (right)") - CONFIG_BIND(g_settings.input.binds[0][22], 1, "r_x_minus", "Right analog X- (left)") - CONFIG_BIND(g_settings.input.binds[0][23], 1, "r_y_plus", "Right analog Y+ (down)") - CONFIG_BIND(g_settings.input.binds[0][24], 1, "r_y_minus", "Right analog Y- (up)") - END_SUB_GROUP() - END_GROUP() - - /*********/ - /* VIDEO */ - /*********/ - START_GROUP("Video") - START_SUB_GROUP("Monitor") - CONFIG_INT(g_settings.video.monitor_index, "video_monitor_index", "Monitor Index") - CONFIG_BOOL(g_settings.video.fullscreen, "video_fullscreen", "Use Fullscreen mode") // if (!g_extern.force_fullscreen) - CONFIG_BOOL(g_settings.video.windowed_fullscreen, "video_windowed_fullscreen", "Windowed Fullscreen Mode") - CONFIG_INT(g_settings.video.fullscreen_x, "video_fullscreen_x", "Fullscreen Width") - CONFIG_INT(g_settings.video.fullscreen_y, "video_fullscreen_y", "Fullscreen Height") - CONFIG_FLOAT(g_settings.video.refresh_rate, "video_refresh_rate", "Refresh Rate") - END_SUB_GROUP() - - /* Video: Window Manager */ - START_SUB_GROUP("Window Manager") - CONFIG_BOOL(g_settings.video.disable_composition, "video_disable_composition", "Disable WM Composition") - END_SUB_GROUP() - - START_SUB_GROUP("Aspect") - CONFIG_BOOL(g_settings.video.force_aspect, "video_force_aspect", "Force aspect ratio") - CONFIG_FLOAT(g_settings.video.aspect_ratio, "video_aspect_ratio", "Aspect Ratio") - CONFIG_INT(g_settings.video.aspect_ratio_idx, "aspect_ratio_index", "Aspect Ratio Index") - CONFIG_BOOL(g_settings.video.aspect_ratio_auto, "video_aspect_ratio_auto", "Use Auto Aspect Ratio") - END_SUB_GROUP() - - START_SUB_GROUP("Scaling") - CONFIG_FLOAT(g_settings.video.xscale, "video_xscale", "X Scale") - CONFIG_FLOAT(g_settings.video.yscale, "video_yscale", "Y Scale") - CONFIG_BOOL(g_settings.video.scale_integer, "video_scale_integer", "Force integer scaling") - - CONFIG_INT(g_extern.console.screen.viewports.custom_vp.x, "custom_viewport_x", "Custom Viewport X") - CONFIG_INT(g_extern.console.screen.viewports.custom_vp.y, "custom_viewport_y", "Custom Viewport Y") - CONFIG_INT(g_extern.console.screen.viewports.custom_vp.width, "custom_viewport_width", "Custom Viewport Width") - CONFIG_INT(g_extern.console.screen.viewports.custom_vp.height, "custom_viewport_height", "Custom Viewport Height") - - CONFIG_BOOL(g_settings.video.smooth, "video_smooth", "Use bilinear filtering") - END_SUB_GROUP() - - START_SUB_GROUP("Shader") - CONFIG_BOOL(g_settings.video.shader_enable, "video_shader_enable", "Enable Shaders") - CONFIG_PATH(g_settings.video.shader_dir, "video_shader_dir", "Shader Directory") - CONFIG_PATH(g_settings.video.shader_path, "video_shader", "Shader") - END_SUB_GROUP() - - START_SUB_GROUP("Sync") - CONFIG_BOOL(g_settings.video.threaded, "video_threaded", "Use threaded video") - CONFIG_BOOL(g_settings.video.vsync, "video_vsync", "Use VSync") - CONFIG_BOOL(g_settings.video.hard_sync, "video_hard_sync", "Use OpenGL Hard Sync") - CONFIG_INT(g_settings.video.hard_sync_frames, "video_hard_sync_frames", "Number of Hard Sync frames") // 0 - 3 - END_SUB_GROUP() - - START_SUB_GROUP("Misc") - CONFIG_BOOL(g_settings.video.post_filter_record, "video_post_filter_record", "Post filter record") - CONFIG_BOOL(g_settings.video.gpu_record, "video_gpu_record", "GPU Record") - CONFIG_BOOL(g_settings.video.gpu_screenshot, "video_gpu_screenshot", "GPU Screenshot") - CONFIG_BOOL(g_settings.video.allow_rotate, "video_allow_rotate", "Allow rotation") - CONFIG_BOOL(g_settings.video.crop_overscan, "video_crop_overscan", "Crop Overscan") - - #ifdef HAVE_DYLIB - CONFIG_PATH(g_settings.video.filter_path, "video_filter", "Software filter"), - #endif - END_SUB_GROUP() - - START_SUB_GROUP("Messages") - CONFIG_PATH(g_settings.video.font_path, "video_font_path", "Font Path") - CONFIG_FLOAT(g_settings.video.font_size, "video_font_size", "Font Size") - CONFIG_BOOL(g_settings.video.font_enable, "video_font_enable", "Font Enable") - CONFIG_BOOL(g_settings.video.font_scale, "video_font_scale", "Font Scale") - CONFIG_FLOAT(g_settings.video.msg_pos_x, "video_message_pos_x", "Message X Position") - CONFIG_FLOAT(g_settings.video.msg_pos_y, "video_message_pos_y", "Message Y Position") - /* message color */ + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_B], 1, "b", "B button (down)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_Y], 1, "y", "Y button (left)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_SELECT],1, "select", "Select button") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_START], 1, "start", "Start button") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_UP], 1, "up", "Up D-pad") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_DOWN], 1, "down", "Down D-pad") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_LEFT], 1, "left", "Left D-pad") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_RIGHT], 1, "right", "Right D-pad") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_A], 1, "a", "A button (right)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_X], 1, "x", "X button (top)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_L], 1, "l", "L button (left shoulder)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_R], 1, "r", "R button (right shoulder)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_L2], 1, "l2", "L2 button (left shoulder #2)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_R2], 1, "r2", "R2 button (right shoulder #2)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_L3], 1, "l3", "L3 button (left analog button)") + CONFIG_BIND(g_settings.input.binds[0][RETRO_DEVICE_ID_JOYPAD_R3], 1, "r3", "R3 button (right analog button)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_TURBO_ENABLE], 1, "turbo", "Turbo enable") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_LEFT_X_PLUS], 1, "l_x_plus", "Left analog X+ (right)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_LEFT_X_MINUS], 1, "l_x_minus", "Left analog X- (left)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_LEFT_Y_PLUS], 1, "l_y_plus", "Left analog Y+ (down)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_LEFT_Y_MINUS], 1, "l_y_minus", "Left analog Y- (up)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_RIGHT_X_PLUS], 1, "r_x_plus", "Right analog X+ (right)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_RIGHT_X_MINUS], 1, "r_x_minus", "Right analog X- (left)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_RIGHT_Y_PLUS], 1, "r_y_plus", "Right analog Y+ (down)") + CONFIG_BIND(g_settings.input.binds[0][RARCH_ANALOG_RIGHT_Y_MINUS], 1, "r_y_minus", "Right analog Y- (up)") END_SUB_GROUP() END_GROUP()