diff --git a/360/main.c b/360/main.c
index c7ca004296..b7ffdd431b 100644
--- a/360/main.c
+++ b/360/main.c
@@ -162,11 +162,12 @@ static void set_default_settings (void)
//g_console
g_console.block_config_read = true;
- g_console.throttle_enable = true;
+ g_console.gamma_correction_enable = false;
g_console.initialize_ssnes_enable = false;
g_console.emulator_initialized = 0;
g_console.mode_switch = MODE_MENU;
g_console.screen_orientation = ORIENTATION_NORMAL;
+ g_console.throttle_enable = true;
strlcpy(g_console.default_rom_startup_dir, "game:", sizeof(g_console.default_rom_startup_dir));
//g_extern
@@ -313,6 +314,7 @@ static void init_settings (bool load_libsnes_path)
// g_console
CONFIG_GET_BOOL_CONSOLE(throttle_enable, "throttle_enable");
+ CONFIG_GET_BOOL_CONSOLE(gamma_correction_enable, "gamma_correction_enable");
CONFIG_GET_STRING_CONSOLE(default_rom_startup_dir, "default_rom_startup_dir");
CONFIG_GET_INT_CONSOLE(screen_orientation, "screen_orientation");
@@ -343,6 +345,7 @@ static void save_settings (void)
// g_console
config_set_string(conf, "default_rom_startup_dir", g_console.default_rom_startup_dir);
+ config_set_bool(conf, "gamma_correction_enable", g_console.gamma_correction_enable);
config_set_bool(conf, "throttle_enable", g_console.throttle_enable);
config_set_int(conf, "screen_orientation", g_console.screen_orientation);
diff --git a/360/media/ssnes_settings.xui b/360/media/ssnes_settings.xui
index 9c67735e27..6c8e1d6825 100644
--- a/360/media/ssnes_settings.xui
+++ b/360/media/ssnes_settings.xui
@@ -3,74 +3,92 @@
1280.000000
720.000000
-
+
-XuiTabScene1
-586.256042
+XuiScene1
+584.528076
363.320007
-345.343994,188.096008,0.000000
+344.000031,184.000015,0.000000
SSNESSettings
-XuiBtnRewind
-XuiTxtSettings
-240.000000
+XuiTxtTitle
+121.056023
40.000000
-25.816010,19.903992,0.000000
+43.581604,21.159988,0.000000
Settings
0xff0f0f0f
0x800f0f0f
-20
+Arial Unicode MS
+21
-XuiBackButton1
+XuiBackButton
208.632019
36.000000
-356.671997,309.000031,0.000000
-XuiBackButton
-XuiBtnRewind
-XuiBackButton1
-XuiBtnHWFilter
-XuiBackButton1
+356.670013,309.000000,0.000000
+XuiSettingsList
+XuiSettingsList
+XuiSettingsList
+XuiSettingsList
Go back to menu
22593
-
+
-XuiBtnRewind
-465.905640
-38.000000
-24.447998,58.447998,0.000000
-XuiBackButton1
-XuiBackButton1
-XuiBtnHWFilter
-XuiBtnHWFilter
-Rewind
+XuiSettingsList
+492.000000
+232.720001
+44.880005,64.959991,0.000000
+XuiBackButton
+XuiBackButton
+XuiBackButton
+XuiBackButton
+Rewind:
+Gamma Correction:
+Hardware filtering:
+
-
-
+
-XuiCheckbox1
-56.304016
-50.000000
-507.000000,58.000000,0.000000
+control_ListItem
+226.000000
+45.000000
+7.000000,22.000000,0.000000
+5
+false
+XuiButton
+0.000000,10.000000,0.000000
-
-
+
+
-XuiBtnHWFilter
-465.905640
-38.000000
-24.447998,108.447998,0.000000
-XuiBackButton1
-XuiBackButton1
-XuiBtnRewind
-XuiBtnRewind
+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
+
+
+
+
diff --git a/360/menu.cpp b/360/menu.cpp
index d742d608d6..111712bf09 100644
--- a/360/menu.cpp
+++ b/360/menu.cpp
@@ -131,13 +131,12 @@ static const wchar_t * set_filter_element(int index)
HRESULT CSSNESSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
{
- GetChildById(L"XuiBtnRewind", &m_rewind);
- GetChildById(L"XuiCheckbox1", &m_rewind_cb);
- GetChildById(L"XuiBackButton1", &m_back);
- GetChildById(L"XuiBtnHWFilter", &m_hw_filter);
+ GetChildById(L"XuiSettingsList", &m_settingslist);
+ GetChildById(L"XuiBackButton", &m_back);
- m_hw_filter.SetText(set_filter_element(g_settings.video.smooth));
- m_rewind_cb.SetCheck(g_settings.rewind_enable);
+ m_settingslist.SetText(SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
+ m_settingslist.SetText(SETTING_GAMMA_CORRECTION_ENABLED, g_console.gamma_correction_enable ? L"Gamma correction: ON" : L"Gamma correction: OFF");
+ m_settingslist.SetText(SETTING_HARDWARE_FILTERING, set_filter_element(g_settings.video.smooth));
return S_OK;
}
@@ -369,17 +368,30 @@ HRESULT CSSNESCoreBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
HRESULT CSSNESSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
{
- if ( hObjPressed == m_rewind)
+ int current_index;
+
+ if ( hObjPressed == m_settingslist)
{
- g_settings.rewind_enable = !g_settings.rewind_enable;
- m_rewind_cb.SetCheck(g_settings.rewind_enable);
+ current_index = m_settingslist.GetCurSel();
+
+ switch(current_index)
+ {
+ case SETTING_EMU_REWIND_ENABLED:
+ g_settings.rewind_enable = !g_settings.rewind_enable;
+ m_settingslist.SetText(SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
+ break;
+ case SETTING_GAMMA_CORRECTION_ENABLED:
+ g_console.gamma_correction_enable = !g_console.gamma_correction_enable;
+ m_settingslist.SetText(SETTING_GAMMA_CORRECTION_ENABLED, g_console.gamma_correction_enable ? L"Gamma correction: ON" : L"Gamma correction: OFF");
+ break;
+ case SETTING_HARDWARE_FILTERING:
+ g_settings.video.smooth = !g_settings.video.smooth;
+ m_settingslist.SetText(SETTING_HARDWARE_FILTERING, set_filter_element(g_settings.video.smooth));
+ break;
+ }
}
- else if ( hObjPressed == m_hw_filter)
- {
- g_settings.video.smooth = !g_settings.video.smooth;
- m_hw_filter.SetText(set_filter_element(g_settings.video.smooth));
- }
- else if ( hObjPressed == m_back )
+
+ if ( hObjPressed == m_back )
NavigateBack(app.hMainScene);
bHandled = TRUE;
diff --git a/360/menu.h b/360/menu.h
index 2544d44e68..b8a9ded823 100644
--- a/360/menu.h
+++ b/360/menu.h
@@ -22,6 +22,13 @@
#include
#include
+enum
+{
+ SETTING_EMU_REWIND_ENABLED = 0,
+ SETTING_GAMMA_CORRECTION_ENABLED,
+ SETTING_HARDWARE_FILTERING
+};
+
class CSSNES : public CXuiModule
{
public:
@@ -118,9 +125,7 @@ public:
class CSSNESSettings: public CXuiSceneImpl
{
protected:
- CXuiControl m_rewind;
- CXuiCheckbox m_rewind_cb;
- CXuiControl m_hw_filter;
+ CXuiList m_settingslist;
CXuiControl m_back;
public:
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
@@ -131,7 +136,7 @@ public:
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
XUI_END_MSG_MAP();
- XUI_IMPLEMENT_CLASS(CSSNESSettings, L"SSNESSettings", XUI_CLASS_TABSCENE)
+ XUI_IMPLEMENT_CLASS(CSSNESSettings, L"SSNESSettings", XUI_CLASS_SCENE)
};
int menu_init (void);
diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp
index 2f53173068..7ff51bfbd9 100644
--- a/360/xdk360_video.cpp
+++ b/360/xdk360_video.cpp
@@ -1,4 +1,4 @@
-/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
+/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
@@ -119,10 +119,10 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i
if(!vid->video_mode.fIsWideScreen)
vid->d3dpp.Flags |= D3DPRESENTFLAG_NO_LETTERBOX;
- vid->d3dpp.BackBufferWidth = vid->video_mode.fIsHiDef ? 1280 : 640;
- vid->d3dpp.BackBufferHeight = vid->video_mode.fIsHiDef ? 720 : 480;
- vid->d3dpp.BackBufferFormat = (D3DFORMAT)MAKESRGBFMT(D3DFMT_A8R8G8B8);
- vid->d3dpp.FrontBufferFormat = (D3DFORMAT)MAKESRGBFMT(D3DFMT_LE_X8R8G8B8);
+ vid->d3dpp.BackBufferWidth = vid->video_mode.fIsHiDef ? 1280 : 640;
+ vid->d3dpp.BackBufferHeight = vid->video_mode.fIsHiDef ? 720 : 480;
+ vid->d3dpp.BackBufferFormat = g_console.gamma_correction_enable ? (D3DFORMAT)MAKESRGBFMT(D3DFMT_A8R8G8B8) : D3DFMT_A8R8G8B8;
+ vid->d3dpp.FrontBufferFormat = g_console.gamma_correction_enable ? (D3DFORMAT)MAKESRGBFMT(D3DFMT_LE_X8R8G8B8) : D3DFMT_LE_X8R8G8B8;
vid->d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE;
vid->d3dpp.MultiSampleQuality = 0;
vid->d3dpp.BackBufferCount = 2;
diff --git a/general.h b/general.h
index 540ad6469c..820dd13cf9 100644
--- a/general.h
+++ b/general.h
@@ -192,6 +192,7 @@ struct console_settings
bool force_resize_enable;
#endif
bool frame_advance_enable;
+ bool gamma_correction_enable;
bool initialize_ssnes_enable;
bool ingame_menu_enable;
bool menu_enable;