(360) Can now enable/disable rewind setting in Settings menu -

can now return from Settings menu to main menu
This commit is contained in:
TwinAphex51224 2012-02-03 11:32:31 +01:00
parent 862082915b
commit 979b7e6479
4 changed files with 33 additions and 2 deletions

View File

@ -137,6 +137,16 @@ static void MountAll()
Mounted[DEVICE_CDROM0] = Mount(DEVICE_CDROM0,"Dvd:");
}
static void set_default_settings(void)
{
//g_settings
g_settings.rewind_enable = false;
//g_console
g_console.block_config_read = true;
g_console.mode_switch = MODE_MENU;
}
int main(int argc, char *argv[])
{
//for devkits only, we will need to mount all partitions for retail
@ -151,7 +161,7 @@ int main(int argc, char *argv[])
config_set_defaults();
g_console.mode_switch = MODE_MENU;
set_default_settings();
xdk360_video_init();

View File

@ -30,6 +30,7 @@
<Width>208.632019</Width>
<Height>36.000000</Height>
<Position>297.919983,239.880005,0.000000</Position>
<Visual>XuiBackButton</Visual>
<NavLeft>XuiButton1</NavLeft>
<Text>Go back to menu</Text>
<PressKey>22593</PressKey>

View File

@ -28,6 +28,7 @@
CSSNES app;
HXUIOBJ hMainScene;
HXUIOBJ hSSNESSettings;
/* Register custom classes */
HRESULT CSSNES::RegisterXuiClasses (void)
@ -48,6 +49,8 @@ HRESULT CSSNES::UnregisterXuiClasses (void)
HRESULT CSSNESSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
{
GetChildById(L"XuiBtnRewind", &m_rewind);
GetChildById(L"XuiCheckbox1", &m_rewind_cb);
GetChildById(L"XuiBackButton1", &m_back);
return S_OK;
}
@ -77,6 +80,22 @@ HRESULT CSSNESMain::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
HRESULT CSSNESSettings::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
{
if ( hObjPressed == m_rewind)
{
g_settings.rewind_enable = !g_settings.rewind_enable;
m_rewind_cb.SetCheck(g_settings.rewind_enable);
}
else if ( hObjPressed == m_back )
{
HRESULT hr = XuiSceneNavigateBack(hSSNESSettings, hMainScene, XUSER_INDEX_FOCUS);
if (FAILED(hr))
{
SSNES_ERR("Failed to load scene.\n");
}
NavigateBack(hMainScene);
}
bHandled = TRUE;
return S_OK;
}
@ -93,7 +112,6 @@ HRESULT CSSNESMain::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
}
else if ( hObjPressed == m_settings )
{
HXUIOBJ hSSNESSettings;
hr = XuiSceneCreate(L"file://game:/media/", L"ssnes_settings.xur", NULL, &hSSNESSettings);
if (FAILED(hr))

View File

@ -37,6 +37,8 @@ class CSSNESSettings: public CXuiSceneImpl
{
protected:
CXuiControl m_rewind;
CXuiCheckbox m_rewind_cb;
CXuiControl m_back;
public:
HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled );