diff --git a/360/main.c b/360/main.c
index 29200bdadc..4cdd16b786 100644
--- a/360/main.c
+++ b/360/main.c
@@ -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();
diff --git a/360/media/ssnes_settings.xui b/360/media/ssnes_settings.xui
index bd6d7adcec..cae2932061 100644
--- a/360/media/ssnes_settings.xui
+++ b/360/media/ssnes_settings.xui
@@ -30,6 +30,7 @@
208.632019
36.000000
297.919983,239.880005,0.000000
+XuiBackButton
XuiButton1
Go back to menu
22593
diff --git a/360/menu.cpp b/360/menu.cpp
index f751194f1a..4b6dea9cc1 100644
--- a/360/menu.cpp
+++ b/360/menu.cpp
@@ -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))
diff --git a/360/menu.h b/360/menu.h
index f4f056975d..d519472277 100644
--- a/360/menu.h
+++ b/360/menu.h
@@ -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 );