Add FXAA to menu item.

This commit is contained in:
shenweip 2013-09-29 16:08:52 +08:00
parent 8540497d09
commit 38e744b080
3 changed files with 17 additions and 7 deletions

View File

@ -342,12 +342,12 @@ namespace MainWindow
SUBMENU_FILE_SAVESTATE_SLOT = 6,
// Game Settings submenus
SUBMENU_RENDERING_RESOLUTION = 7,
SUBMENU_WINDOW_SIZE = 8,
SUBMENU_RENDERING_MODE = 9,
SUBMENU_FRAME_SKIPPING = 10,
SUBMENU_TEXTURE_FILTERING = 11,
SUBMENU_TEXTURE_SCALING = 12,
SUBMENU_RENDERING_RESOLUTION = 8,
SUBMENU_WINDOW_SIZE = 9,
SUBMENU_RENDERING_MODE = 10,
SUBMENU_FRAME_SKIPPING = 11,
SUBMENU_TEXTURE_FILTERING = 12,
SUBMENU_TEXTURE_SCALING = 13,
};
std::string GetMenuItemText(int menuID) {
@ -514,6 +514,7 @@ namespace MainWindow
TranslateMenuItem(ID_OPTIONS_STRETCHDISPLAY);
TranslateMenuItem(ID_OPTIONS_FULLSCREEN, L"\tAlt+Return, F11");
TranslateMenuItem(ID_OPTIONS_VSYNC);
TranslateMenuItem(ID_OPTIONS_FXAA);
TranslateSubMenu("Rendering Resolution", MENU_OPTIONS, SUBMENU_RENDERING_RESOLUTION, L"\tCtrl+1");
TranslateMenuItem(ID_OPTIONS_SCREENAUTO);
// Skip rendering resolution 2x-5x..
@ -1205,6 +1206,12 @@ namespace MainWindow
g_Config.bVSync = !g_Config.bVSync;
break;
case ID_OPTIONS_FXAA:
g_Config.bFXAA = !g_Config.bFXAA;
if (gpu)
gpu->Resized();
break;
case ID_TEXTURESCALING_OFF: setTexScalingMultiplier(TEXSCALING_OFF); break;
case ID_TEXTURESCALING_2X: setTexScalingMultiplier(TEXSCALING_2X); break;
case ID_TEXTURESCALING_3X: setTexScalingMultiplier(TEXSCALING_3X); break;
@ -1588,6 +1595,7 @@ namespace MainWindow
CHECKITEM(ID_OPTIONS_SHOWFPS, g_Config.iShowFPSCounter);
CHECKITEM(ID_OPTIONS_FRAMESKIP, g_Config.iFrameSkip != 0);
CHECKITEM(ID_OPTIONS_VSYNC, g_Config.bVSync);
CHECKITEM(ID_OPTIONS_FXAA, g_Config.bFXAA);
CHECKITEM(ID_OPTIONS_TOPMOST, g_Config.bTopMost);
CHECKITEM(ID_EMULATION_SOUND, g_Config.bEnableSound);
CHECKITEM(ID_TEXTURESCALING_DEPOSTERIZE, g_Config.bTexDeposterize);

View File

@ -380,9 +380,10 @@ BEGIN
MENUITEM "Stretch to Display", ID_OPTIONS_STRETCHDISPLAY
MENUITEM "Fullscreen", ID_OPTIONS_FULLSCREEN
MENUITEM "VSync", ID_OPTIONS_VSYNC
MENUITEM "FXAA antialiasing", ID_OPTIONS_FXAA
POPUP "Rendering Resolution"
BEGIN
MENUITEM "Auto", ID_OPTIONS_SCREENAUTO
MENUITEM "Auto", ID_OPTIONS_SCREENAUTO
MENUITEM "&1x", ID_OPTIONS_SCREEN1X
MENUITEM "&2x", ID_OPTIONS_SCREEN2X
MENUITEM "&3x", ID_OPTIONS_SCREEN3X

View File

@ -269,6 +269,7 @@
#define IDC_GEDBG_LISTS_ALLLISTS 40123
#define IDC_GEDBG_LISTS_STACK 40124
#define IDC_GEDBG_LISTS_SELECTEDLIST 40125
#define ID_OPTIONS_FXAA 40126
// Dummy option to let the buffered rendering hotkey cycle through all the options.
#define ID_OPTIONS_BUFFEREDRENDERINGDUMMY 40500