diff --git a/360/media/hd/rarch_controls.xui b/360/media/hd/rarch_controls.xui new file mode 100644 index 0000000000..846b6367f0 --- /dev/null +++ b/360/media/hd/rarch_controls.xui @@ -0,0 +1,303 @@ + + +1280.000000 +720.000000 + + + +XuiScene1 +776.000061 +512.000061 +200.000015,112.000008,0.000000 +RetroArchControls + + + +XuiTxtTitle +121.056023 +40.000000 +43.581604,21.159988,0.000000 +Controls +0xff0f0f0f +0x800f0f0f +Arial Unicode MS +21 + + + + +XuiControlsList +683.120056 +360.000000 +44.880005,88.000015,0.000000 +XuiControlNoSlider +RetroPad Button B: +RetroPad Button Y: +RetroPad Button Select: +RetroPad Button Start: +RetroPad D-Pad Up: +RetroPad D-Pad Down: +RetroPad D-Pad Left: +RetroPad D-Pad Right: +RetroPad Button A: +RetroPad Button X: +RetroPad Button L1: +RetroPad Button R1: +RetroPad Button L2: +RetroPad Button R2: +RetroPad Button L3: +RetroPad Button R3: +Reset all buttons to default + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + + +XuiBackButton +208.632019 +36.000000 +536.000000,448.000000,0.000000 +Go back to menu +22593 + + + + +XuiControlNoSlider +102.000000 +60.000000 +618.000061,15.999985,0.000000 +XuiControlsList +3 + + + + diff --git a/360/media/sd/rarch_controls.xui b/360/media/sd/rarch_controls.xui new file mode 100644 index 0000000000..b8d9f35a73 --- /dev/null +++ b/360/media/sd/rarch_controls.xui @@ -0,0 +1,291 @@ + + +1280.000000 +720.000000 + + + +XuiScene1 +584.528076 +363.320007 +344.000031,184.000015,0.000000 +RetroArchControls + + + +XuiTxtTitle +121.056023 +40.000000 +43.581604,21.159988,0.000000 +Controls +0xff0f0f0f +0x800f0f0f +Arial Unicode MS +21 + + + + +XuiControlsList +492.000000 +209.679993 +44.880005,88.000000,0.000000 +XuiControlNoSlider +RetroPad Button B: +RetroPad Button Y: +RetroPad Button Select: +RetroPad Button Start: +RetroPad D-Pad Up: +RetroPad D-Pad Down: +RetroPad D-Pad Left: +RetroPad D-Pad Right: +RetroPad Button A: +RetroPad Button X: +RetroPad Button L1: +RetroPad Button R1: +RetroPad Button L2: +RetroPad Button R2: +RetroPad Button L3: +RetroPad Button R3: +Reset all buttons to defaults + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + +control_ListItem +226.000000 +45.000000 +7.000000,22.000000,0.000000 +5 +false +XuiButton +0.000000,10.000000,0.000000 + + + + + +XuiBackButton +208.632019 +36.000000 +356.670013,309.000000,0.000000 +Go back to menu +22593 + + + + +XuiControlNoSlider +94.000061 +64.000000 +440.000000,16.000000,0.000000 +XuiControlsList +3 + + + + diff --git a/360/menu.cpp b/360/menu.cpp index daabd4f2f2..711da74bc0 100644 --- a/360/menu.cpp +++ b/360/menu.cpp @@ -56,6 +56,7 @@ HRESULT CRetroArch::RegisterXuiClasses (void) CRetroArchCoreBrowser::Register(); CRetroArchShaderBrowser::Register(); CRetroArchQuickMenu::Register(); + CRetroArchControls::Register(); CRetroArchSettings::Register(); return S_OK; @@ -69,6 +70,7 @@ HRESULT CRetroArch::UnregisterXuiClasses (void) CRetroArchShaderBrowser::Unregister(); CRetroArchFileBrowser::Unregister(); CRetroArchQuickMenu::Register(); + CRetroArchControls::Register(); CRetroArchSettings::Unregister(); return S_OK; @@ -130,6 +132,102 @@ HRESULT CRetroArchShaderBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandl return S_OK; } +HRESULT CRetroArchControls::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) +{ + unsigned i; + int controlno; + char buttons[RARCH_FIRST_META_KEY][128]; + + GetChildById(L"XuiControlsList", &m_controlslist); + GetChildById(L"XuiBackButton", &m_back); + GetChildById(L"XuiControlNoSlider", &m_controlnoslider); + + m_controlnoslider.SetValue(g_settings.input.currently_selected_controller_no); + m_controlnoslider.GetValue(&controlno); + + for(i = 0; i < RARCH_FIRST_META_KEY; i++) + { + snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s", rarch_default_libretro_keybind_name_lut[i], controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][i].joykey)); + m_controlslist.SetText(i, rarch_convert_char_to_wchar(buttons[i])); + } + + return S_OK; +} + +HRESULT CRetroArchControls::OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled) +{ + char button[128]; + char buttons[RARCH_FIRST_META_KEY][128]; + int controlno, i, current_index; + + current_index = m_controlslist.GetCurSel(); + m_controlnoslider.GetValue(&controlno); + + for(i = 0; i < RARCH_FIRST_META_KEY; i++) + { + snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s", rarch_default_libretro_keybind_name_lut[i], controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][i].joykey)); + m_controlslist.SetText(i, rarch_convert_char_to_wchar(buttons[i])); + } + + switch(pControlNavigateData->nControlNavigate) + { + case XUI_CONTROL_NAVIGATE_LEFT: + if(current_index > 0 && current_index != SETTING_CONTROLS_DEFAULT_ALL) + { + rarch_input_set_keybind(controlno, KEYBIND_DECREMENT, current_index); + snprintf(button, sizeof(button), "%s #%d: %s", rarch_default_libretro_keybind_name_lut[current_index], controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey)); + m_controlslist.SetText(current_index, rarch_convert_char_to_wchar(button)); + } + break; + case XUI_CONTROL_NAVIGATE_RIGHT: + if(current_index < RARCH_FIRST_META_KEY && current_index != SETTING_CONTROLS_DEFAULT_ALL) + { + rarch_input_set_keybind(controlno, KEYBIND_INCREMENT, current_index); + snprintf(button, sizeof(button), "%s #%d: %s", rarch_default_libretro_keybind_name_lut[current_index], controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey)); + m_controlslist.SetText(current_index, rarch_convert_char_to_wchar(button)); + } + break; + case XUI_CONTROL_NAVIGATE_UP: + case XUI_CONTROL_NAVIGATE_DOWN: + break; + } + + return S_OK; +} + +HRESULT CRetroArchControls::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled ) +{ + int current_index, i, controlno; + char buttons[RARCH_FIRST_META_KEY][128]; + m_controlnoslider.GetValue(&controlno); + + if ( hObjPressed == m_controlslist) + { + current_index = m_controlslist.GetCurSel(); + + switch(current_index) + { + case SETTING_CONTROLS_DEFAULT_ALL: + rarch_input_set_default_keybinds(0); + + for(i = 0; i < RARCH_FIRST_META_KEY; i++) + { + snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s", rarch_default_libretro_keybind_name_lut[i], controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][i].joykey)); + m_controlslist.SetText(i, rarch_convert_char_to_wchar(buttons[i])); + } + break; + default: + rarch_input_set_keybind(controlno, KEYBIND_DEFAULT, current_index); + snprintf(buttons[current_index], sizeof(buttons[current_index]), "%s #%d: %s", rarch_default_libretro_keybind_name_lut[current_index], controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey)); + m_controlslist.SetText(current_index, rarch_convert_char_to_wchar(buttons[current_index])); + break; + } + } + + bHandled = TRUE; + return S_OK; +} + HRESULT CRetroArchSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) { char shader1str[128], shader2str[128]; @@ -539,8 +637,14 @@ HRESULT CRetroArchMain::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled ) } else if ( hObjPressed == m_controls) { - msg_queue_clear(g_extern.msg_queue); - msg_queue_push(g_extern.msg_queue, "TODO - Not yet implemented.", 1, 180); + hr = XuiSceneCreate(hdmenus_allowed ? L"file://game:/media/hd/" : L"file://game:/media/sd/", L"rarch_controls.xur", NULL, &app.hControlsMenu); + + if (FAILED(hr)) + RARCH_ERR("Failed to load scene.\n"); + hCur = app.hControlsMenu; + msg_queue_clear(g_extern.msg_queue); + msg_queue_push(g_extern.msg_queue, "INFO - Press LEFT/RIGHT to change the controls, and press\nSTART/A to reset a button to default values.", 1, 180); + NavigateForward(app.hControlsMenu); } else if ( hObjPressed == m_change_libretro_core ) { diff --git a/360/menu.h b/360/menu.h index bae6356063..feaa272a30 100644 --- a/360/menu.h +++ b/360/menu.h @@ -32,6 +32,27 @@ enum SETTING_SCALE_ENABLED }; +enum +{ + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_B = 0, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_Y, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_SELECT, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_START, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_UP, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_DOWN, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_LEFT, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_RIGHT, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_A, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_X, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_L, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_R, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_L2, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_R2, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_L3, + SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_R3, + SETTING_CONTROLS_DEFAULT_ALL +}; + enum { INPUT_LOOP_MENU, @@ -42,6 +63,7 @@ class CRetroArch : public CXuiModule { public: HXUIOBJ hMainScene; + HXUIOBJ hControlsMenu; HXUIOBJ hFileBrowser; HXUIOBJ hCoreBrowser; HXUIOBJ hShaderBrowser; @@ -167,6 +189,26 @@ public: XUI_IMPLEMENT_CLASS(CRetroArchSettings, L"RetroArchSettings", XUI_CLASS_SCENE) }; +class CRetroArchControls: public CXuiSceneImpl +{ +protected: + CXuiList m_controlslist; + CXuiControl m_back; + CXuiSlider m_controlnoslider; +public: + HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled ); + HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled ); + HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled); + + XUI_BEGIN_MSG_MAP() + XUI_ON_XM_INIT( OnInit) + XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate ) + XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress ) + XUI_END_MSG_MAP(); + + XUI_IMPLEMENT_CLASS(CRetroArchControls, L"RetroArchControls", XUI_CLASS_SCENE) +}; + int menu_init (void); void menu_deinit (void); void menu_loop (void); diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index d9b90e1efa..47cc3e0c5a 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -395,6 +395,33 @@ void xdk360_set_fbo_enable (bool enable) vid->fbo_enabled = enable; } +static void xdk360_gfx_init_fbo(xdk360_video_t *vid) +{ + if (vid->lpTexture_ot) + { + vid->lpTexture_ot->Release(); + vid->lpTexture_ot = NULL; + } + + if (vid->lpSurface) + { + vid->lpSurface->Release(); + vid->lpSurface = NULL; + } + + vid->d3d_render_device->CreateTexture(512 * g_settings.video.fbo_scale_x, 512 * g_settings.video.fbo_scale_y, + 1, 0, g_console.gamma_correction_enable ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_A8R8G8B8 ) : D3DFMT_A8R8G8B8, + 0, &vid->lpTexture_ot, NULL); + + vid->d3d_render_device->CreateRenderTarget(512 * g_settings.video.fbo_scale_x, 512 * g_settings.video.fbo_scale_y, + g_console.gamma_correction_enable ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_A8R8G8B8 ) : D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, + 0, 0, &vid->lpSurface, NULL); + + vid->lpTexture_ot_as16srgb = *vid->lpTexture_ot; + xdk360_convert_texture_to_as16_srgb(vid->lpTexture); + xdk360_convert_texture_to_as16_srgb(&vid->lpTexture_ot_as16srgb); +} + static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) { if (g_d3d) @@ -453,16 +480,7 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i vid->d3d_render_device->CreateTexture(512, 512, 1, 0, D3DFMT_LIN_X1R5G5B5, 0, &vid->lpTexture, NULL); - vid->d3d_render_device->CreateTexture(512 * g_settings.video.fbo_scale_x, 512 * g_settings.video.fbo_scale_y, 1, 0, g_console.gamma_correction_enable ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_A8R8G8B8 ) : D3DFMT_A8R8G8B8, - 0, &vid->lpTexture_ot, NULL); - - vid->d3d_render_device->CreateRenderTarget(512 * g_settings.video.fbo_scale_x, 512 * g_settings.video.fbo_scale_y, g_console.gamma_correction_enable ? ( D3DFORMAT )MAKESRGBFMT( D3DFMT_A8R8G8B8 ) : D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, - 0, 0, &vid->lpSurface, NULL); - - vid->lpTexture_ot_as16srgb = *vid->lpTexture_ot; - - xdk360_convert_texture_to_as16_srgb(vid->lpTexture); - xdk360_convert_texture_to_as16_srgb(&vid->lpTexture_ot_as16srgb); + xdk360_gfx_init_fbo(vid); D3DLOCKED_RECT d3dlr; vid->lpTexture->LockRect(0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK); diff --git a/console/console_ext.c b/console/console_ext.c index 4138c75d0f..4e7ddff1f7 100644 --- a/console/console_ext.c +++ b/console/console_ext.c @@ -219,22 +219,22 @@ struct platform_bind uint64_t rarch_default_keybind_lut[RARCH_FIRST_META_KEY]; char rarch_default_libretro_keybind_name_lut[RARCH_FIRST_META_KEY][256] = { - "B Button", /* RETRO_DEVICE_ID_JOYPAD_B */ - "Y Button", /* RETRO_DEVICE_ID_JOYPAD_Y */ - "Select button", /* RETRO_DEVICE_ID_JOYPAD_SELECT */ - "Start button", /* RETRO_DEVICE_ID_JOYPAD_START */ - "D-Pad Up", /* RETRO_DEVICE_ID_JOYPAD_UP */ - "D-Pad Down", /* RETRO_DEVICE_ID_JOYPAD_DOWN */ - "D-Pad Left", /* RETRO_DEVICE_ID_JOYPAD_LEFT */ - "D-Pad Right", /* RETRO_DEVICE_ID_JOYPAD_RIGHT */ - "A Button", /* RETRO_DEVICE_ID_JOYPAD_A */ - "X Button", /* RETRO_DEVICE_ID_JOYPAD_X */ - "L Button", /* RETRO_DEVICE_ID_JOYPAD_L */ - "R Button", /* RETRO_DEVICE_ID_JOYPAD_R */ - "L2 Button", /* RETRO_DEVICE_ID_JOYPAD_L2 */ - "R2 Button", /* RETRO_DEVICE_ID_JOYPAD_R2 */ - "L3 Button", /* RETRO_DEVICE_ID_JOYPAD_L3 */ - "R3 Button", /* RETRO_DEVICE_ID_JOYPAD_R3 */ + "RetroPad Button B", /* RETRO_DEVICE_ID_JOYPAD_B */ + "RetroPad Button Y", /* RETRO_DEVICE_ID_JOYPAD_Y */ + "RetroPad Button Select", /* RETRO_DEVICE_ID_JOYPAD_SELECT */ + "RetroPad Button Start", /* RETRO_DEVICE_ID_JOYPAD_START */ + "RetroPad D-Pad Up", /* RETRO_DEVICE_ID_JOYPAD_UP */ + "RetroPad D-Pad Down", /* RETRO_DEVICE_ID_JOYPAD_DOWN */ + "RetroPad D-Pad Left", /* RETRO_DEVICE_ID_JOYPAD_LEFT */ + "RetroPad D-Pad Right", /* RETRO_DEVICE_ID_JOYPAD_RIGHT */ + "RetroPad Button A", /* RETRO_DEVICE_ID_JOYPAD_A */ + "RetroPad Button X", /* RETRO_DEVICE_ID_JOYPAD_X */ + "RetroPad Button L1", /* RETRO_DEVICE_ID_JOYPAD_L */ + "RetroPad Button R1", /* RETRO_DEVICE_ID_JOYPAD_R */ + "RetroPad Button L2", /* RETRO_DEVICE_ID_JOYPAD_L2 */ + "RetroPad Button R2", /* RETRO_DEVICE_ID_JOYPAD_R2 */ + "RetroPad Button L3", /* RETRO_DEVICE_ID_JOYPAD_L3 */ + "RetroPad Button R3", /* RETRO_DEVICE_ID_JOYPAD_R3 */ }; #if defined(__CELLOS_LV2__) diff --git a/general.h b/general.h index 09fc0b2289..154e69efd7 100644 --- a/general.h +++ b/general.h @@ -154,6 +154,7 @@ struct settings float axis_threshold; int joypad_map[MAX_PLAYERS]; #ifdef RARCH_CONSOLE + unsigned currently_selected_controller_no; unsigned dpad_emulation[MAX_PLAYERS]; #endif bool netplay_client_swap_input; diff --git a/gfx/shader_hlsl.c b/gfx/shader_hlsl.c index 6e68f1c0e1..b7203ddf33 100644 --- a/gfx/shader_hlsl.c +++ b/gfx/shader_hlsl.c @@ -206,6 +206,7 @@ static void set_program_attributes(unsigned i) prg[i].frame_cnt_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.frame_count"); prg[i].frame_dir_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.frame_direction"); prg[i].mvp = prg[i].v_ctable->GetConstantByName(NULL, "$modelViewProj"); + prg[i].mvp_val = XMMatrixIdentity(); } bool hlsl_load_shader(unsigned index, const char *path) @@ -215,6 +216,8 @@ bool hlsl_load_shader(unsigned index, const char *path) if (!hlsl_active || index == 0) retval = false; + // FIXME: This could cause corruption issues if prg[index] == prg[0] + // (Set earlier if path == NULL). if(retval) { //check if fragment program already exists diff --git a/msvc-360/RetroArch-360/RetroArch-360.vcxproj b/msvc-360/RetroArch-360/RetroArch-360.vcxproj index a204e17414..c0d22cbeed 100644 --- a/msvc-360/RetroArch-360/RetroArch-360.vcxproj +++ b/msvc-360/RetroArch-360/RetroArch-360.vcxproj @@ -679,6 +679,38 @@ $(OutDir)media\sd\rarch_shader_browser.xur; + + + Document + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\hd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\hd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\hd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\hd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\hd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\hd\rarch_controls.xur" + $(OutDir)media\hd\rarch_controls.xur; + $(OutDir)media\hd\rarch_controls.xur; + $(OutDir)media\hd\rarch_controls.xur; + $(OutDir)media\hd\rarch_controls.xur; + $(OutDir)media\hd\rarch_controls.xur; + $(OutDir)media\hd\rarch_controls.xur; + + + Document + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\sd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\sd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\sd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\sd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\sd\rarch_controls.xur" + xui2bin /D /NOLOGO "%(RelativeDir)rarch_controls.xui" "$(OutDir)media\sd\rarch_controls.xur" + $(OutDir)media\sd\rarch_controls.xur; + $(OutDir)media\sd\rarch_controls.xur; + $(OutDir)media\sd\rarch_controls.xur; + $(OutDir)media\sd\rarch_controls.xur; + $(OutDir)media\sd\rarch_controls.xur; + $(OutDir)media\sd\rarch_controls.xur; + + diff --git a/msvc-360/RetroArch-360/RetroArch-360.vcxproj.filters b/msvc-360/RetroArch-360/RetroArch-360.vcxproj.filters index 19b0675894..204ae163b3 100644 --- a/msvc-360/RetroArch-360/RetroArch-360.vcxproj.filters +++ b/msvc-360/RetroArch-360/RetroArch-360.vcxproj.filters @@ -192,5 +192,11 @@ Source Files\media\hd + + Source Files\media\hd + + + Source Files\media\sd + \ No newline at end of file diff --git a/msvc/RetroArch/RetroArch.sln b/msvc/RetroArch/RetroArch.sln deleted file mode 100644 index 15158b3c02..0000000000 --- a/msvc/RetroArch/RetroArch.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RetroArch", "RetroArch\RetroArch.vcxproj", "{032D1FA7-7AA5-47BB-B51B-68B75ADE729D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Debug|Win32.ActiveCfg = Debug|Win32 - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Debug|Win32.Build.0 = Debug|Win32 - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Debug|x64.ActiveCfg = Debug|x64 - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Debug|x64.Build.0 = Debug|x64 - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Release|Win32.ActiveCfg = Release|Win32 - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Release|Win32.Build.0 = Release|Win32 - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Release|x64.ActiveCfg = Release|x64 - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/msvc/RetroArch/RetroArch/RetroArch.vcxproj b/msvc/RetroArch/RetroArch/RetroArch.vcxproj deleted file mode 100644 index 8ed5534d10..0000000000 --- a/msvc/RetroArch/RetroArch/RetroArch.vcxproj +++ /dev/null @@ -1,251 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {032D1FA7-7AA5-47BB-B51B-68B75ADE729D} - Win32Proj - RetroArch - - - - Application - true - MultiByte - - - Application - true - MultiByte - - - Application - false - true - MultiByte - - - Application - false - true - MultiByte - - - - - - - - - - - - - - - - - - - - true - retroarch - - - true - retroarch - - - false - retroarch - - - false - retroarch - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - Precise - CompileAsCpp - /D HAVE_SDL /D PACKAGE_VERSION=\"0.9.6-rc1\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON /D HAVE_SDL_IMAGE /D HAVE_FREETYPE /D HAVE_XML %(AdditionalOptions) - - - Console - true - SDL.lib;SDL_image.lib;opengl32.lib;ws2_32.lib;dxguid.lib;dinput8.lib;cg.lib;cgGL.lib;winmm.lib;shlwapi.lib;dsound.lib;avcodec.lib;avformat.lib;swscale.lib;avutil.lib;freetype.lib;libxml2.lib;%(AdditionalDependencies) - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - false - Precise - CompileAsCpp - /D HAVE_SDL /D PACKAGE_VERSION=\"0.9.6-rc1\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON /D HAVE_SDL_IMAGE /D HAVE_FREETYPE /D HAVE_XML %(AdditionalOptions) - StreamingSIMDExtensions2 - - - Console - true - SDL.lib;SDL_image.lib;opengl32.lib;ws2_32.lib;dxguid.lib;dinput8.lib;cg.lib;cgGL.lib;winmm.lib;shlwapi.lib;dsound.lib;avcodec.lib;avformat.lib;swscale.lib;avutil.lib;freetype.lib;libxml2.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - /D HAVE_SDL /D PACKAGE_VERSION=\"0.9.6-rc1\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON /D HAVE_SDL_IMAGE /D HAVE_FREETYPE /D HAVE_XML %(AdditionalOptions) - CompileAsCpp - Fast - %(AdditionalIncludeDirectories) - - - Console - true - true - true - SDL.lib;SDL_image.lib;opengl32.lib;ws2_32.lib;dxguid.lib;dinput8.lib;cg.lib;cgGL.lib;winmm.lib;shlwapi.lib;dsound.lib;avcodec.lib;avformat.lib;swscale.lib;avutil.lib;freetype.lib;libxml2.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - /D HAVE_SDL /D PACKAGE_VERSION=\"0.9.6-rc1\" /D _CRT_SECURE_NO_WARNINGS /D HAVE_NETPLAY /D HAVE_THREADS /D HAVE_OPENGL /D HAVE_DYLIB /D HAVE_DYNAMIC /D HAVE_CG /D HAVE_XAUDIO /D HAVE_FBO /D HAVE_CONFIGFILE /D HAVE_DSOUND /D HAVE_FFMPEG /D HAVE_FFMPEG_ALLOC_CONTEXT3 /D HAVE_FFMPEG_AVCODEC_OPEN2 /D HAVE_FFMPEG_AVIO_OPEN /D HAVE_FFMPEG_AVFORMAT_WRITE_HEADER /D HAVE_FFMPEG_AVFORMAT_NEW_STREAM /D HAVE_X264RGB /D HAVE_PYTHON /D HAVE_SDL_IMAGE /D HAVE_FREETYPE /D HAVE_XML %(AdditionalOptions) - CompileAsCpp - Fast - %(AdditionalIncludeDirectories) - StreamingSIMDExtensions2 - - - Console - true - true - true - SDL.lib;SDL_image.lib;opengl32.lib;ws2_32.lib;dxguid.lib;dinput8.lib;cg.lib;cgGL.lib;winmm.lib;shlwapi.lib;dsound.lib;avcodec.lib;avformat.lib;swscale.lib;avutil.lib;freetype.lib;libxml2.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvc/RetroArch/RetroArch/RetroArch.vcxproj.filters b/msvc/RetroArch/RetroArch/RetroArch.vcxproj.filters deleted file mode 100644 index 68bffedfbf..0000000000 --- a/msvc/RetroArch/RetroArch/RetroArch.vcxproj.filters +++ /dev/null @@ -1,282 +0,0 @@ - - - - - Sources\gfx - - - Sources\gfx - - - Sources\gfx - - - Sources\gfx - - - Sources\gfx - - - Sources\gfx - - - Sources\gfx - - - Sources\audio - - - Sources\audio - - - Sources\audio - - - Sources\audio - - - Sources\audio - - - Sources\input - - - Sources\input - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\top - - - Sources\compat - - - Sources\top - - - Sources\gfx - - - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\top - - - Headers\gfx - - - Headers\gfx - - - Headers\gfx - - - Headers\gfx - - - Headers\gfx - - - Headers\gfx - - - Headers\gfx - - - Headers\gfx - - - Headers\input - - - Headers\input - - - Headers\input - - - Headers\gfx - - - Headers\gfx - - - Headers\audio - - - Headers\audio - - - Headers\gfx - - - - - {28fed54e-87b3-4bc6-ae27-7cea25ef2e43} - - - {75ab8cb3-2b54-4d04-94b0-bbd92a445ee4} - - - {4482f76d-5312-4ffd-a97e-c1339ed6b43d} - - - {0cc589b9-03ab-4f7a-a7f0-9a4e4f39139e} - - - {2ebd2975-3e8c-4be6-b8a5-b63185e39ef4} - - - {f5587648-1c52-408e-80de-effb813294f1} - - - {3e498457-23e5-469a-8f36-5bd9430d9e00} - - - {efcb213b-6038-4ad9-a2c4-07d8063ca5d8} - - - {3542518e-8825-483f-992b-3c680ef3de4c} - - - {8adc8069-5b48-4fca-9fe8-22214a5fcc08} - - - {705155a3-9237-44b0-952a-32b8a384210d} - - -