|
|
|
@ -56,9 +56,9 @@ enum
|
|
|
|
|
S_LBL_REWIND_GRANULARITY,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
HXUIOBJ m_settingslist;
|
|
|
|
|
HXUIOBJ m_menulist;
|
|
|
|
|
HXUIOBJ m_menutitle;
|
|
|
|
|
HXUIOBJ m_back;
|
|
|
|
|
HXUIOBJ m_title;
|
|
|
|
|
|
|
|
|
|
class CRetroArch : public CXuiModule
|
|
|
|
|
{
|
|
|
|
@ -486,8 +486,6 @@ class CRetroArchSettings: public CXuiSceneImpl
|
|
|
|
|
|
|
|
|
|
class CRetroArchControls: public CXuiSceneImpl
|
|
|
|
|
{
|
|
|
|
|
protected:
|
|
|
|
|
HXUIOBJ m_controlnoslider;
|
|
|
|
|
public:
|
|
|
|
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
|
|
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
|
|
@ -715,16 +713,15 @@ static void set_dpad_emulation_label(unsigned port, char *str, size_t sizeof_str
|
|
|
|
|
HRESULT CRetroArchControls::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
|
|
|
|
{
|
|
|
|
|
unsigned i;
|
|
|
|
|
int controlno;
|
|
|
|
|
char buttons[RARCH_FIRST_META_KEY][128];
|
|
|
|
|
|
|
|
|
|
GetChildById(L"XuiControlsList", &m_settingslist);
|
|
|
|
|
GetChildById(L"XuiMenuList", &m_menulist);
|
|
|
|
|
GetChildById(L"XuiBackButton", &m_back);
|
|
|
|
|
GetChildById(L"XuiControlNoSlider", &m_controlnoslider);
|
|
|
|
|
GetChildById(L"XuiTxtTitle", &m_menutitle);
|
|
|
|
|
|
|
|
|
|
XuiSliderSetValue(m_controlnoslider, 0);
|
|
|
|
|
XuiSliderGetValue(m_controlnoslider, &controlno);
|
|
|
|
|
XuiListDeleteItems(m_settingslist, 0, XuiListGetItemCount(m_settingslist));
|
|
|
|
|
XuiListDeleteItems(m_menulist, 0, XuiListGetItemCount(m_menulist));
|
|
|
|
|
|
|
|
|
|
XuiTextElementSetText(m_menutitle, L"Input options");
|
|
|
|
|
|
|
|
|
|
unsigned keybind_end = RETRO_DEVICE_ID_JOYPAD_R3 + 1;
|
|
|
|
|
|
|
|
|
@ -732,25 +729,26 @@ HRESULT CRetroArchControls::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
|
|
|
|
{
|
|
|
|
|
struct platform_bind key_label;
|
|
|
|
|
strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc));
|
|
|
|
|
key_label.joykey = g_settings.input.binds[controlno][i].joykey;
|
|
|
|
|
key_label.joykey = g_settings.input.binds[rgui->current_pad][i].joykey;
|
|
|
|
|
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
|
|
|
|
|
|
|
|
|
|
snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s",
|
|
|
|
|
g_settings.input.binds[controlno][i].desc, controlno, key_label.desc);
|
|
|
|
|
g_settings.input.binds[rgui->current_pad][i].desc,
|
|
|
|
|
rgui->current_pad, key_label.desc);
|
|
|
|
|
mbstowcs(strw_buffer, buttons[i], sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListInsertItems(m_settingslist, i, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, i, strw_buffer);
|
|
|
|
|
XuiListInsertItems(m_menulist, i, 1);
|
|
|
|
|
XuiListSetText(m_menulist, i, strw_buffer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set_dpad_emulation_label(controlno, buttons[0], sizeof(buttons[0]));
|
|
|
|
|
set_dpad_emulation_label(rgui->current_pad, buttons[0], sizeof(buttons[0]));
|
|
|
|
|
mbstowcs(strw_buffer, buttons[0], sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListInsertItems(m_settingslist, keybind_end, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_CONTROLS_DPAD_EMULATION, strw_buffer);
|
|
|
|
|
XuiListInsertItems(m_menulist, keybind_end, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_CONTROLS_DPAD_EMULATION, strw_buffer);
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, keybind_end + 1, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_CONTROLS_DEFAULT_ALL, L"Reset all buttons to default");
|
|
|
|
|
XuiListInsertItems(m_menulist, keybind_end + 1, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_CONTROLS_DEFAULT_ALL, L"Reset all buttons to default");
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -760,25 +758,24 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
{
|
|
|
|
|
char button[128];
|
|
|
|
|
char buttons[RARCH_FIRST_META_KEY][128];
|
|
|
|
|
int controlno, i, current_index;
|
|
|
|
|
int i, current_index;
|
|
|
|
|
|
|
|
|
|
current_index = XuiListGetCurSel(m_settingslist, NULL);
|
|
|
|
|
XuiSliderGetValue(m_controlnoslider, &controlno);
|
|
|
|
|
current_index = XuiListGetCurSel(m_menulist, NULL);
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < RARCH_FIRST_META_KEY; i++)
|
|
|
|
|
{
|
|
|
|
|
struct platform_bind key_label;
|
|
|
|
|
strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc));
|
|
|
|
|
key_label.joykey = g_settings.input.binds[controlno][i].joykey;
|
|
|
|
|
key_label.joykey = g_settings.input.binds[rgui->current_pad][i].joykey;
|
|
|
|
|
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
|
|
|
|
|
|
|
|
|
|
snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s",
|
|
|
|
|
g_settings.input.binds[controlno][i].desc, controlno,
|
|
|
|
|
g_settings.input.binds[rgui->current_pad][i].desc, rgui->current_pad,
|
|
|
|
|
key_label.desc);
|
|
|
|
|
mbstowcs(strw_buffer, buttons[i], sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListSetText(m_settingslist, i, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, i, strw_buffer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch(pControlNavigateData->nControlNavigate)
|
|
|
|
@ -791,7 +788,7 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
{
|
|
|
|
|
unsigned keybind_action = 0;
|
|
|
|
|
|
|
|
|
|
switch(g_settings.input.dpad_emulation[controlno])
|
|
|
|
|
switch(g_settings.input.dpad_emulation[rgui->current_pad])
|
|
|
|
|
{
|
|
|
|
|
case ANALOG_DPAD_NONE:
|
|
|
|
|
break;
|
|
|
|
@ -804,7 +801,8 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (keybind_action)
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[controlno], controlno, 0, keybind_action);
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[rgui->current_pad],
|
|
|
|
|
rgui->current_pad, 0, keybind_action);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_CONTROLS_DEFAULT_ALL:
|
|
|
|
@ -813,19 +811,20 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
{
|
|
|
|
|
struct platform_bind key_label;
|
|
|
|
|
strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc));
|
|
|
|
|
key_label.joykey = g_settings.input.binds[controlno][current_index].joykey;
|
|
|
|
|
key_label.joykey = g_settings.input.binds[rgui->current_pad][current_index].joykey;
|
|
|
|
|
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
|
|
|
|
|
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[controlno],
|
|
|
|
|
controlno, current_index, (1ULL << KEYBINDS_ACTION_DECREMENT_BIND));
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[rgui->current_pad],
|
|
|
|
|
rgui->current_pad, current_index, (1ULL << KEYBINDS_ACTION_DECREMENT_BIND));
|
|
|
|
|
|
|
|
|
|
snprintf(button, sizeof(button), "%s #%d: %s",
|
|
|
|
|
g_settings.input.binds[controlno][current_index].desc, controlno, key_label.desc);
|
|
|
|
|
g_settings.input.binds[rgui->current_pad][current_index].desc,
|
|
|
|
|
rgui->current_pad, key_label.desc);
|
|
|
|
|
mbstowcs(strw_buffer, button, sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListSetText(m_settingslist, current_index, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, current_index, strw_buffer);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -838,7 +837,7 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
{
|
|
|
|
|
unsigned keybind_action = 0;
|
|
|
|
|
|
|
|
|
|
switch(g_settings.input.dpad_emulation[controlno])
|
|
|
|
|
switch(g_settings.input.dpad_emulation[rgui->current_pad])
|
|
|
|
|
{
|
|
|
|
|
case ANALOG_DPAD_NONE:
|
|
|
|
|
keybind_action = (1ULL << KEYBINDS_ACTION_SET_ANALOG_DPAD_LSTICK);
|
|
|
|
@ -851,8 +850,8 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (keybind_action)
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[controlno], controlno,
|
|
|
|
|
0, keybind_action);
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[rgui->current_pad],
|
|
|
|
|
rgui->current_pad, 0, keybind_action);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_CONTROLS_DEFAULT_ALL:
|
|
|
|
@ -861,19 +860,19 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
{
|
|
|
|
|
struct platform_bind key_label;
|
|
|
|
|
strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc));
|
|
|
|
|
key_label.joykey = g_settings.input.binds[controlno][current_index].joykey;
|
|
|
|
|
key_label.joykey = g_settings.input.binds[rgui->current_pad][current_index].joykey;
|
|
|
|
|
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[controlno],
|
|
|
|
|
controlno, current_index, (1ULL << KEYBINDS_ACTION_INCREMENT_BIND));
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[rgui->current_pad],
|
|
|
|
|
rgui->current_pad, current_index, (1ULL << KEYBINDS_ACTION_INCREMENT_BIND));
|
|
|
|
|
|
|
|
|
|
snprintf(button, sizeof(button), "%s #%d: %s",
|
|
|
|
|
g_settings.input.binds[controlno][current_index].desc, controlno,
|
|
|
|
|
g_settings.input.binds[rgui->current_pad][current_index].desc, rgui->current_pad,
|
|
|
|
|
key_label.desc);
|
|
|
|
|
mbstowcs(strw_buffer, button, sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListSetText(m_settingslist, current_index, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, current_index, strw_buffer);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -883,25 +882,24 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set_dpad_emulation_label(controlno, button, sizeof(button));
|
|
|
|
|
set_dpad_emulation_label(rgui->current_pad, button, sizeof(button));
|
|
|
|
|
|
|
|
|
|
mbstowcs(strw_buffer, button, sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_CONTROLS_DPAD_EMULATION, strw_buffer);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_CONTROLS_DEFAULT_ALL, L"Reset all buttons to default");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_CONTROLS_DPAD_EMULATION, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_CONTROLS_DEFAULT_ALL, L"Reset all buttons to default");
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HRESULT CRetroArchControls::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
|
|
|
|
{
|
|
|
|
|
int current_index, i, controlno;
|
|
|
|
|
int current_index, i;
|
|
|
|
|
char buttons[RARCH_FIRST_META_KEY][128];
|
|
|
|
|
XuiSliderGetValue(m_controlnoslider, &controlno);
|
|
|
|
|
process_input_ret = 0;
|
|
|
|
|
|
|
|
|
|
if ( hObjPressed == m_settingslist)
|
|
|
|
|
if ( hObjPressed == m_menulist)
|
|
|
|
|
{
|
|
|
|
|
current_index = XuiListGetCurSel(m_settingslist, NULL);
|
|
|
|
|
current_index = XuiListGetCurSel(m_menulist, NULL);
|
|
|
|
|
|
|
|
|
|
switch(current_index)
|
|
|
|
|
{
|
|
|
|
@ -910,52 +908,52 @@ HRESULT CRetroArchControls::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
|
|
|
|
case SETTING_CONTROLS_DEFAULT_ALL:
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(driver.input_data,
|
|
|
|
|
g_settings.input.device[controlno], controlno, 0,
|
|
|
|
|
g_settings.input.device[rgui->current_pad], rgui->current_pad, 0,
|
|
|
|
|
(1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS));
|
|
|
|
|
|
|
|
|
|
for(i = 0; i < RARCH_FIRST_META_KEY; i++)
|
|
|
|
|
{
|
|
|
|
|
struct platform_bind key_label;
|
|
|
|
|
strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc));
|
|
|
|
|
key_label.joykey = g_settings.input.binds[controlno][i].joykey;
|
|
|
|
|
key_label.joykey = g_settings.input.binds[rgui->current_pad][i].joykey;
|
|
|
|
|
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
|
|
|
|
|
|
|
|
|
|
snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s",
|
|
|
|
|
g_settings.input.binds[controlno][i].desc, controlno, key_label.desc);
|
|
|
|
|
g_settings.input.binds[rgui->current_pad][i].desc, rgui->current_pad, key_label.desc);
|
|
|
|
|
mbstowcs(strw_buffer, buttons[i], sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListSetText(m_settingslist, i, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, i, strw_buffer);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
{
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[controlno],
|
|
|
|
|
controlno, current_index, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND));
|
|
|
|
|
driver.input->set_keybinds(driver.input_data, g_settings.input.device[rgui->current_pad],
|
|
|
|
|
rgui->current_pad, current_index, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND));
|
|
|
|
|
|
|
|
|
|
struct platform_bind key_label;
|
|
|
|
|
strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc));
|
|
|
|
|
key_label.joykey = g_settings.input.binds[controlno][current_index].joykey;
|
|
|
|
|
key_label.joykey = g_settings.input.binds[rgui->current_pad][current_index].joykey;
|
|
|
|
|
|
|
|
|
|
if (driver.input->set_keybinds)
|
|
|
|
|
driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
|
|
|
|
|
|
|
|
|
|
snprintf(buttons[current_index], sizeof(buttons[current_index]), "%s #%d: %s",
|
|
|
|
|
g_settings.input.binds[controlno][current_index].desc, controlno,
|
|
|
|
|
g_settings.input.binds[rgui->current_pad][current_index].desc, rgui->current_pad,
|
|
|
|
|
key_label.desc);
|
|
|
|
|
mbstowcs(strw_buffer, buttons[current_index], sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListSetText(m_settingslist, current_index, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, current_index, strw_buffer);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set_dpad_emulation_label(controlno, buttons[current_index], sizeof(buttons[current_index]));
|
|
|
|
|
set_dpad_emulation_label(rgui->current_pad, buttons[current_index], sizeof(buttons[current_index]));
|
|
|
|
|
|
|
|
|
|
mbstowcs(strw_buffer, buttons[current_index], sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_CONTROLS_DPAD_EMULATION, strw_buffer);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_CONTROLS_DEFAULT_ALL, L"Reset all buttons to default");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_CONTROLS_DPAD_EMULATION, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_CONTROLS_DEFAULT_ALL, L"Reset all buttons to default");
|
|
|
|
|
|
|
|
|
|
bHandled = TRUE;
|
|
|
|
|
return 0;
|
|
|
|
@ -963,29 +961,29 @@ HRESULT CRetroArchControls::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
|
|
|
|
|
|
|
|
|
HRESULT CRetroArchSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
|
|
|
|
{
|
|
|
|
|
GetChildById(L"XuiSettingsList", &m_settingslist);
|
|
|
|
|
GetChildById(L"XuiMenuList", &m_menulist);
|
|
|
|
|
GetChildById(L"XuiBackButton", &m_back);
|
|
|
|
|
GetChildById(L"XuiTxtTitle", &m_title);
|
|
|
|
|
GetChildById(L"XuiTxtTitle", &m_menutitle);
|
|
|
|
|
|
|
|
|
|
XuiListDeleteItems(m_settingslist, 0, XuiListGetItemCount(m_settingslist));
|
|
|
|
|
XuiListDeleteItems(m_menulist, 0, XuiListGetItemCount(m_menulist));
|
|
|
|
|
|
|
|
|
|
XuiTextElementSetText(m_title, L"Settings");
|
|
|
|
|
XuiTextElementSetText(m_menutitle, L"Settings");
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, 0, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
XuiListInsertItems(m_menulist, 0, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_REWIND_GRANULARITY, sizeof(strw_buffer));
|
|
|
|
|
XuiListInsertItems(m_settingslist, 1, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
XuiListInsertItems(m_menulist, 1, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, 2, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info Messages: ON" : L"Info Messages: OFF");
|
|
|
|
|
XuiListInsertItems(m_settingslist, 3, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info Messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
XuiListInsertItems(m_settingslist, 4, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma Correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
XuiListInsertItems(m_settingslist, 5, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
XuiListInsertItems(m_menulist, 2, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info Messages: ON" : L"Info Messages: OFF");
|
|
|
|
|
XuiListInsertItems(m_menulist, 3, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info Messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
XuiListInsertItems(m_menulist, 4, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma Correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
XuiListInsertItems(m_menulist, 5, 1);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -995,47 +993,47 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
|
|
|
|
int current_index;
|
|
|
|
|
process_input_ret = 0;
|
|
|
|
|
|
|
|
|
|
if ( hObjPressed == m_settingslist)
|
|
|
|
|
if ( hObjPressed == m_menulist)
|
|
|
|
|
{
|
|
|
|
|
current_index = XuiListGetCurSel(m_settingslist, NULL);
|
|
|
|
|
current_index = XuiListGetCurSel(m_menulist, NULL);
|
|
|
|
|
|
|
|
|
|
switch(current_index)
|
|
|
|
|
{
|
|
|
|
|
case SETTING_EMU_REWIND_ENABLED:
|
|
|
|
|
settings_set(1ULL << S_REWIND);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_REWIND_GRANULARITY:
|
|
|
|
|
g_settings.rewind_granularity++;
|
|
|
|
|
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_REWIND_GRANULARITY, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_SHOW_INFO_MSG:
|
|
|
|
|
if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW))
|
|
|
|
|
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_INFO_DRAW);
|
|
|
|
|
else
|
|
|
|
|
g_extern.lifecycle_mode_state |= (1ULL << MODE_INFO_DRAW);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info messages: ON" : L"Info messages: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info messages: ON" : L"Info messages: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_SHOW_DEBUG_INFO_MSG:
|
|
|
|
|
if (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
|
|
|
|
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_FPS_DRAW);
|
|
|
|
|
else
|
|
|
|
|
g_extern.lifecycle_mode_state |= (1ULL << MODE_FPS_DRAW);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_GAMMA_CORRECTION_ENABLED:
|
|
|
|
|
if (g_extern.main_is_init)
|
|
|
|
|
{
|
|
|
|
|
g_extern.console.screen.gamma_correction = g_extern.console.screen.gamma_correction ? 0 : 1;
|
|
|
|
|
driver.video->restart();
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_HW_TEXTURE_FILTER:
|
|
|
|
|
g_settings.video.smooth = !g_settings.video.smooth;
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1049,7 +1047,7 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro
|
|
|
|
|
int current_index;
|
|
|
|
|
xdk_d3d_video_t *device_ptr = (xdk_d3d_video_t*)driver.video_data;
|
|
|
|
|
|
|
|
|
|
current_index = XuiListGetCurSel(m_settingslist, NULL);
|
|
|
|
|
current_index = XuiListGetCurSel(m_menulist, NULL);
|
|
|
|
|
|
|
|
|
|
switch(pControlNavigateData->nControlNavigate)
|
|
|
|
|
{
|
|
|
|
@ -1058,40 +1056,40 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro
|
|
|
|
|
{
|
|
|
|
|
case SETTING_EMU_REWIND_ENABLED:
|
|
|
|
|
settings_set(1ULL << S_REWIND);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_REWIND_GRANULARITY:
|
|
|
|
|
if (g_settings.rewind_granularity > 1)
|
|
|
|
|
g_settings.rewind_granularity--;
|
|
|
|
|
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_REWIND_GRANULARITY, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_SHOW_INFO_MSG:
|
|
|
|
|
if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW))
|
|
|
|
|
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_INFO_DRAW);
|
|
|
|
|
else
|
|
|
|
|
g_extern.lifecycle_mode_state |= (1ULL << MODE_INFO_DRAW);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info messages: ON" : L"Info messages: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info messages: ON" : L"Info messages: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_SHOW_DEBUG_INFO_MSG:
|
|
|
|
|
if (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
|
|
|
|
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_FPS_DRAW);
|
|
|
|
|
else
|
|
|
|
|
g_extern.lifecycle_mode_state |= (1ULL << MODE_FPS_DRAW);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_GAMMA_CORRECTION_ENABLED:
|
|
|
|
|
if (g_extern.main_is_init)
|
|
|
|
|
{
|
|
|
|
|
g_extern.console.screen.gamma_correction = g_extern.console.screen.gamma_correction ? 0 : 1;
|
|
|
|
|
driver.video->restart();
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_HW_TEXTURE_FILTER:
|
|
|
|
|
g_settings.video.smooth = !g_settings.video.smooth;
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -1105,36 +1103,36 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro
|
|
|
|
|
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_INFO_DRAW);
|
|
|
|
|
else
|
|
|
|
|
g_extern.lifecycle_mode_state |= (1ULL << MODE_INFO_DRAW);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info messages: ON" : L"Info messages: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) ? L"Info messages: ON" : L"Info messages: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_SHOW_DEBUG_INFO_MSG:
|
|
|
|
|
if (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW))
|
|
|
|
|
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_FPS_DRAW);
|
|
|
|
|
else
|
|
|
|
|
g_extern.lifecycle_mode_state |= (1ULL << MODE_FPS_DRAW);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_SHOW_DEBUG_INFO_MSG, (g_extern.lifecycle_mode_state & (1ULL << MODE_FPS_DRAW)) ? L"Debug Info messages: ON" : L"Debug Info messages: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_GAMMA_CORRECTION_ENABLED:
|
|
|
|
|
if (g_extern.main_is_init)
|
|
|
|
|
{
|
|
|
|
|
g_extern.console.screen.gamma_correction = g_extern.console.screen.gamma_correction ? 0 : 1;
|
|
|
|
|
driver.video->restart();
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_REWIND_ENABLED:
|
|
|
|
|
settings_set(1ULL << S_REWIND);
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_EMU_REWIND_GRANULARITY:
|
|
|
|
|
g_settings.rewind_granularity++;
|
|
|
|
|
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_REWIND_GRANULARITY, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_EMU_REWIND_GRANULARITY, strw_buffer);
|
|
|
|
|
break;
|
|
|
|
|
case SETTING_HW_TEXTURE_FILTER:
|
|
|
|
|
g_settings.video.smooth = !g_settings.video.smooth;
|
|
|
|
|
XuiListSetText(m_settingslist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
XuiListSetText(m_menulist, SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Default Filter: Linear" : L"Default Filter: Nearest");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
@ -1164,48 +1162,48 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro
|
|
|
|
|
|
|
|
|
|
HRESULT CRetroArchQuickMenu::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
|
|
|
|
{
|
|
|
|
|
GetChildById(L"XuiQuickMenuList", &m_settingslist);
|
|
|
|
|
GetChildById(L"XuiMenuList", &m_menulist);
|
|
|
|
|
GetChildById(L"XuiBackButton", &m_back);
|
|
|
|
|
GetChildById(L"XuiTxtTitle", &m_title);
|
|
|
|
|
GetChildById(L"XuiTxtTitle", &m_menutitle);
|
|
|
|
|
|
|
|
|
|
XuiListDeleteItems(m_settingslist, 0, XuiListGetItemCount(m_settingslist));
|
|
|
|
|
XuiListDeleteItems(m_menulist, 0, XuiListGetItemCount(m_menulist));
|
|
|
|
|
|
|
|
|
|
XuiTextElementSetText(m_title, L"Menu");
|
|
|
|
|
XuiTextElementSetText(m_menutitle, L"Menu");
|
|
|
|
|
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_LOAD_STATE_SLOT, sizeof(strw_buffer));
|
|
|
|
|
XuiListInsertItems(m_settingslist, 0, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_LOAD_STATE, strw_buffer);
|
|
|
|
|
XuiListInsertItems(m_menulist, 0, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_LOAD_STATE, strw_buffer);
|
|
|
|
|
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SAVE_STATE_SLOT, sizeof(strw_buffer));
|
|
|
|
|
XuiListInsertItems(m_settingslist, 1, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_SAVE_STATE, strw_buffer);
|
|
|
|
|
XuiListInsertItems(m_menulist, 1, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_SAVE_STATE, strw_buffer);
|
|
|
|
|
|
|
|
|
|
if (driver.video_poke->set_aspect_ratio)
|
|
|
|
|
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
|
|
|
|
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ASPECT_RATIO, sizeof(strw_buffer));
|
|
|
|
|
XuiListInsertItems(m_settingslist, 2, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
XuiListInsertItems(m_menulist, 2, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
|
|
|
|
|
driver.video->set_rotation(driver.video_data, g_extern.console.screen.orientation);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ROTATION, sizeof(strw_buffer));
|
|
|
|
|
XuiListInsertItems(m_settingslist, 3, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
XuiListInsertItems(m_menulist, 3, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, 4, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_RESIZE_MODE, L"Custom Ratio ...");
|
|
|
|
|
XuiListInsertItems(m_menulist, 4, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_RESIZE_MODE, L"Custom Ratio ...");
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, 5, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_FRAME_ADVANCE, L"Frame Advance ...");
|
|
|
|
|
XuiListInsertItems(m_menulist, 5, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_FRAME_ADVANCE, L"Frame Advance ...");
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, 6, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_RESET, L"Restart Game");
|
|
|
|
|
XuiListInsertItems(m_menulist, 6, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_RESET, L"Restart Game");
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, 7, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_RETURN_TO_GAME, L"Resume Game");
|
|
|
|
|
XuiListInsertItems(m_menulist, 7, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_RETURN_TO_GAME, L"Resume Game");
|
|
|
|
|
|
|
|
|
|
XuiListInsertItems(m_settingslist, 8, 1);
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_QUIT_RARCH, L"Quit RetroArch");
|
|
|
|
|
XuiListInsertItems(m_menulist, 8, 1);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_QUIT_RARCH, L"Quit RetroArch");
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -1215,7 +1213,7 @@ HRESULT CRetroArchQuickMenu::OnControlNavigate(XUIMessageControlNavigate *pContr
|
|
|
|
|
bool aspectratio_changed = false;
|
|
|
|
|
int current_index;
|
|
|
|
|
|
|
|
|
|
current_index = XuiListGetCurSel(m_settingslist, NULL);
|
|
|
|
|
current_index = XuiListGetCurSel(m_menulist, NULL);
|
|
|
|
|
|
|
|
|
|
switch(pControlNavigateData->nControlNavigate)
|
|
|
|
|
{
|
|
|
|
@ -1226,9 +1224,9 @@ HRESULT CRetroArchQuickMenu::OnControlNavigate(XUIMessageControlNavigate *pContr
|
|
|
|
|
case MENU_XUI_ITEM_SAVE_STATE:
|
|
|
|
|
rarch_state_slot_decrease();
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_LOAD_STATE_SLOT, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_LOAD_STATE, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_LOAD_STATE, strw_buffer);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SAVE_STATE_SLOT, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_SAVE_STATE, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_SAVE_STATE, strw_buffer);
|
|
|
|
|
break;
|
|
|
|
|
case MENU_XUI_ITEM_ASPECT_RATIO:
|
|
|
|
|
settings_set(1ULL << S_ASPECT_RATIO_DECREMENT);
|
|
|
|
@ -1237,7 +1235,7 @@ HRESULT CRetroArchQuickMenu::OnControlNavigate(XUIMessageControlNavigate *pContr
|
|
|
|
|
case MENU_XUI_ITEM_ORIENTATION:
|
|
|
|
|
settings_set(1ULL << S_ROTATION_DECREMENT);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ROTATION, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
driver.video->set_rotation(driver.video_data, g_extern.console.screen.orientation);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -1251,9 +1249,9 @@ HRESULT CRetroArchQuickMenu::OnControlNavigate(XUIMessageControlNavigate *pContr
|
|
|
|
|
case MENU_XUI_ITEM_SAVE_STATE:
|
|
|
|
|
rarch_state_slot_increase();
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_LOAD_STATE_SLOT, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_LOAD_STATE, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_LOAD_STATE, strw_buffer);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SAVE_STATE_SLOT, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_SAVE_STATE, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_SAVE_STATE, strw_buffer);
|
|
|
|
|
break;
|
|
|
|
|
case MENU_XUI_ITEM_ASPECT_RATIO:
|
|
|
|
|
settings_set(1ULL << S_ASPECT_RATIO_INCREMENT);
|
|
|
|
@ -1262,7 +1260,7 @@ HRESULT CRetroArchQuickMenu::OnControlNavigate(XUIMessageControlNavigate *pContr
|
|
|
|
|
case MENU_XUI_ITEM_ORIENTATION:
|
|
|
|
|
settings_set(1ULL << S_ROTATION_INCREMENT);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ROTATION, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
driver.video->set_rotation(driver.video_data, g_extern.console.screen.orientation);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -1279,7 +1277,7 @@ HRESULT CRetroArchQuickMenu::OnControlNavigate(XUIMessageControlNavigate *pContr
|
|
|
|
|
if (driver.video_poke->set_aspect_ratio)
|
|
|
|
|
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ASPECT_RATIO, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bHandled = TRUE;
|
|
|
|
@ -1305,9 +1303,9 @@ HRESULT CRetroArchQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
|
|
|
|
int current_index = 0;
|
|
|
|
|
process_input_ret = 0;
|
|
|
|
|
|
|
|
|
|
if ( hObjPressed == m_settingslist)
|
|
|
|
|
if ( hObjPressed == m_menulist)
|
|
|
|
|
{
|
|
|
|
|
current_index = XuiListGetCurSel(m_settingslist, NULL);
|
|
|
|
|
current_index = XuiListGetCurSel(m_menulist, NULL);
|
|
|
|
|
|
|
|
|
|
switch(current_index)
|
|
|
|
|
{
|
|
|
|
@ -1332,19 +1330,19 @@ HRESULT CRetroArchQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
|
|
|
|
if (driver.video_poke->set_aspect_ratio)
|
|
|
|
|
driver.video_poke->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ASPECT_RATIO, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
break;
|
|
|
|
|
case MENU_XUI_ITEM_ORIENTATION:
|
|
|
|
|
settings_set(1ULL << S_DEF_ROTATION);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ROTATION, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ORIENTATION, strw_buffer);
|
|
|
|
|
driver.video->set_rotation(driver.video_data, g_extern.console.screen.orientation);
|
|
|
|
|
break;
|
|
|
|
|
case MENU_XUI_ITEM_RESIZE_MODE:
|
|
|
|
|
input_loop = INPUT_LOOP_RESIZE_MODE;
|
|
|
|
|
g_settings.video.aspect_ratio_idx = ASPECT_RATIO_CUSTOM;
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_ASPECT_RATIO, sizeof(strw_buffer));
|
|
|
|
|
XuiListSetText(m_settingslist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
XuiListSetText(m_menulist, MENU_XUI_ITEM_ASPECT_RATIO, strw_buffer);
|
|
|
|
|
|
|
|
|
|
if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW))
|
|
|
|
|
msg_queue_push(g_extern.msg_queue, "INFO - Resize the screen by moving around the two analog sticks.\n", 1, 270);
|
|
|
|
@ -1475,14 +1473,14 @@ HRESULT CRetroArchMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
|
|
|
|
GetChildById(L"XuiBtnQuickMenu", &m_quick_menu);
|
|
|
|
|
GetChildById(L"XuiBtnControls", &m_controls);
|
|
|
|
|
GetChildById(L"XuiBtnQuit", &m_quit);
|
|
|
|
|
GetChildById(L"XuiTxtTitle", &m_title);
|
|
|
|
|
GetChildById(L"XuiTxtTitle", &m_menutitle);
|
|
|
|
|
GetChildById(L"XuiTxtCoreText", &m_core);
|
|
|
|
|
GetChildById(L"XuiBtnLibretroCore", &m_change_libretro_core);
|
|
|
|
|
|
|
|
|
|
mbstowcs(strw_buffer, g_extern.title_buf, sizeof(strw_buffer) / sizeof(wchar_t));
|
|
|
|
|
XuiTextElementSetText(m_core, strw_buffer);
|
|
|
|
|
menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_RARCH_VERSION, sizeof(strw_buffer));
|
|
|
|
|
XuiTextElementSetText(m_title, strw_buffer);
|
|
|
|
|
XuiTextElementSetText(m_menutitle, strw_buffer);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|