[Project64] remove some of the #ifdef WINDOWS_UI from settings pages

This commit is contained in:
zilmar 2015-11-07 12:11:25 +11:00
parent 6585657d05
commit a1d9af57a6
18 changed files with 645 additions and 678 deletions

Binary file not shown.

View File

@ -31,7 +31,8 @@ struct RECT_STRUCT
long bottom; long bottom;
}; };
struct WINDOWS_PAINTSTRUCT { struct WINDOWS_PAINTSTRUCT
{
HDC hdc; HDC hdc;
int fErase; int fErase;
RECT_STRUCT rcPaint; RECT_STRUCT rcPaint;
@ -49,9 +50,7 @@ class CN64System;
// Remove this to test compilation outside of the Windows ATL environment. // Remove this to test compilation outside of the Windows ATL environment.
#endif #endif
#ifdef WINDOWS_UI
#include <WTL App.h> #include <WTL App.h>
#endif
#include <User Interface/MenuShortCuts.h> #include <User Interface/MenuShortCuts.h>
#include ".\\User Interface\\Rom Browser.h" #include ".\\User Interface\\Rom Browser.h"
@ -61,6 +60,4 @@ class CN64System;
#include ".\\User Interface\\Notification Class.h" #include ".\\User Interface\\Notification Class.h"
#include ".\\User Interface\\Frame Per Second Class.h" #include ".\\User Interface\\Frame Per Second Class.h"
#include ".\\User Interface\\resource.h" #include ".\\User Interface\\resource.h"
#ifdef WINDOWS_UI
#include ".\\User Interface\\Settings Config.h" #include ".\\User Interface\\Settings Config.h"
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
CAdvancedOptionsPage::CAdvancedOptionsPage (HWND hParent, const RECT & rcDispay ) CAdvancedOptionsPage::CAdvancedOptionsPage (HWND hParent, const RECT & rcDispay )
@ -72,4 +71,3 @@ void CAdvancedOptionsPage::ResetPage()
{ {
CSettingsPageImpl<CAdvancedOptionsPage>::ResetPage(); CSettingsPageImpl<CAdvancedOptionsPage>::ResetPage();
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionsDirectoriesPage::COptionsDirectoriesPage(HWND hParent, const RECT & rcDispay) : COptionsDirectoriesPage::COptionsDirectoriesPage(HWND hParent, const RECT & rcDispay) :
@ -353,4 +352,3 @@ void COptionsDirectoriesPage::ResetPage()
SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0); SendMessage(GetParent(), PSM_CHANGED, (WPARAM)m_hWnd, 0);
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - General.h" #include "Settings Page - Game - General.h"
@ -110,9 +109,7 @@ bool CGameGeneralPage::EnableReset ( void )
return false; return false;
} }
void CGameGeneralPage::ResetPage() void CGameGeneralPage::ResetPage()
{ {
CSettingsPageImpl<CGameGeneralPage>::ResetPage(); CSettingsPageImpl<CGameGeneralPage>::ResetPage();
} }
#endif

View File

@ -17,7 +17,6 @@ class CGameGeneralPage :
public CSettingsPageImpl<CGameGeneralPage>, public CSettingsPageImpl<CGameGeneralPage>,
public CSettingsPage public CSettingsPage
{ {
BEGIN_MSG_MAP_EX(CGameGeneralPage) BEGIN_MSG_MAP_EX(CGameGeneralPage)
COMMAND_HANDLER_EX(IDC_RDRAM_SIZE,LBN_SELCHANGE,ComboBoxChanged) COMMAND_HANDLER_EX(IDC_RDRAM_SIZE,LBN_SELCHANGE,ComboBoxChanged)
COMMAND_HANDLER_EX(IDC_SAVE_TYPE,LBN_SELCHANGE,ComboBoxChanged) COMMAND_HANDLER_EX(IDC_SAVE_TYPE,LBN_SELCHANGE,ComboBoxChanged)
@ -44,6 +43,4 @@ public:
void ApplySettings ( bool UpdateScreen ); void ApplySettings ( bool UpdateScreen );
bool EnableReset ( void ); bool EnableReset ( void );
void ResetPage ( void ); void ResetPage ( void );
private:
}; };

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - Plugin.h" #include "Settings Page - Game - Plugin.h"
@ -200,7 +199,8 @@ void CGamePluginPage::UpdatePageSettings ( void )
} }
ComboBox->SetDefault((WPARAM)Plugin); ComboBox->SetDefault((WPARAM)Plugin);
} }
} else { }
else {
ComboBox->SetDefault(NULL); ComboBox->SetDefault(NULL);
} }
} }
@ -263,7 +263,8 @@ void CGamePluginPage::ApplyComboBoxes ( void )
{ {
g_Settings->SaveString(cb_iter->first, Plugin->FileName.c_str()); g_Settings->SaveString(cb_iter->first, Plugin->FileName.c_str());
} }
} else { }
else {
g_Settings->DeleteSetting(cb_iter->first); g_Settings->DeleteSetting(cb_iter->first);
} }
} }
@ -347,4 +348,3 @@ void CGamePluginPage::HleAudioChanged ( UINT /*Code*/, int id, HWND /*ctl*/ )
break; break;
} }
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - Recompiler.h" #include "Settings Page - Game - Recompiler.h"
@ -96,4 +95,3 @@ void CGameRecompilePage::ResetPage()
{ {
CSettingsPageImpl<CGameRecompilePage>::ResetPage(); CSettingsPageImpl<CGameRecompilePage>::ResetPage();
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
#include "Settings Page - Game - Status.h" #include "Settings Page - Game - Status.h"
@ -72,4 +71,3 @@ void CGameStatusPage::ResetPage()
{ {
CSettingsPageImpl<CGameStatusPage>::ResetPage(); CSettingsPageImpl<CGameStatusPage>::ResetPage();
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionsGameBrowserPage::COptionsGameBrowserPage(HWND hParent, const RECT & rcDispay) : COptionsGameBrowserPage::COptionsGameBrowserPage(HWND hParent, const RECT & rcDispay) :
@ -205,7 +204,9 @@ void COptionsGameBrowserPage::ApplySettings( bool UpdateScreen )
m_Fields[i].ResetPos(); m_Fields[i].ResetPos();
} }
bColChanged = true; bColChanged = true;
} else { }
else
{
size_t Item, listCount = m_Using.GetCount(); size_t Item, listCount = m_Using.GetCount();
for (Item = 0; Item < listCount; Item++) for (Item = 0; Item < listCount; Item++)
{ {
@ -254,4 +255,3 @@ void COptionsGameBrowserPage::ResetPage()
} }
CSettingsPageImpl<COptionsGameBrowserPage>::ResetPage(); CSettingsPageImpl<COptionsGameBrowserPage>::ResetPage();
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionsShortCutsPage::COptionsShortCutsPage(HWND hParent, const RECT & rcDispay) : COptionsShortCutsPage::COptionsShortCutsPage(HWND hParent, const RECT & rcDispay) :
@ -52,7 +51,6 @@ COptionsShortCutsPage::COptionsShortCutsPage (HWND hParent, const RECT & rcDispa
OnCpuStateChanged(LBN_SELCHANGE, IDC_C_CPU_STATE, GetDlgItem(IDC_C_CPU_STATE)); OnCpuStateChanged(LBN_SELCHANGE, IDC_C_CPU_STATE, GetDlgItem(IDC_C_CPU_STATE));
CheckResetEnable(); CheckResetEnable();
} }
void COptionsShortCutsPage::CheckResetEnable(void) void COptionsShortCutsPage::CheckResetEnable(void)
@ -70,7 +68,6 @@ void COptionsShortCutsPage::CheckResetEnable ( void )
m_EnableReset = true; m_EnableReset = true;
return; return;
} }
} }
m_EnableReset = false; m_EnableReset = false;
} }
@ -132,7 +129,6 @@ void COptionsShortCutsPage::OnCpuStateChanged(UINT /*Code*/, int /*id*/, HWND /*
m_MenuItems.SetItemState(hParent, TVIS_BOLD, TVIS_BOLD); m_MenuItems.SetItemState(hParent, TVIS_BOLD, TVIS_BOLD);
break; break;
} }
} }
} }
@ -191,7 +187,6 @@ void COptionsShortCutsPage::OnAssignClicked ( UINT /*Code*/, int /*id*/, HWND /*
ACCESS_MODE AccessLevel = (ACCESS_MODE)m_CpuState.GetItemData(m_CpuState.GetCurSel()); ACCESS_MODE AccessLevel = (ACCESS_MODE)m_CpuState.GetItemData(m_CpuState.GetCurSel());
HTREEITEM hSelectedItem = m_MenuItems.GetSelectedItem(); HTREEITEM hSelectedItem = m_MenuItems.GetSelectedItem();
if (hSelectedItem == NULL) if (hSelectedItem == NULL)
{ {
@ -239,7 +234,9 @@ void COptionsShortCutsPage::OnShortCutChanged ( UINT /*Code*/, int /*id*/, HWND
if (str.length() > 0) if (str.length() > 0)
{ {
str.resize(std::remove(str.begin(), str.end(), '&') - str.begin()); str.resize(std::remove(str.begin(), str.end(), '&') - str.begin());
} else { }
else
{
str = "None"; str = "None";
} }
SetDlgItemText(IDC_ASSIGNED_MENU_ITEM, str.c_str()); SetDlgItemText(IDC_ASSIGNED_MENU_ITEM, str.c_str());
@ -259,7 +256,6 @@ void COptionsShortCutsPage::RefreshShortCutOptions ( HTREEITEM hItem )
return; return;
} }
ACCESS_MODE AccessLevel = (ACCESS_MODE)m_CpuState.GetItemData(m_CpuState.GetCurSel()); ACCESS_MODE AccessLevel = (ACCESS_MODE)m_CpuState.GetItemData(m_CpuState.GetCurSel());
CShortCutItem * ShortCut = (CShortCutItem *)m_MenuItems.GetItemData(hItem); CShortCutItem * ShortCut = (CShortCutItem *)m_MenuItems.GetItemData(hItem);
@ -283,7 +279,6 @@ void COptionsShortCutsPage::RefreshShortCutOptions ( HTREEITEM hItem )
} }
} }
BOOL CALLBACK KeyPromptDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam*/) BOOL CALLBACK KeyPromptDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM /*lParam*/)
{ {
switch (uMsg) switch (uMsg)
@ -344,7 +339,6 @@ void COptionsShortCutsPage::InputGetKeys (void)
} }
if (!::IsWindow(hKeyDlg)) { fDone = true; } if (!::IsWindow(hKeyDlg)) { fDone = true; }
} }
::SetFocus(GetParent()); ::SetFocus(GetParent());
::EnableWindow(GetParent(), true); ::EnableWindow(GetParent(), true);
@ -380,4 +374,3 @@ void COptionsShortCutsPage::ResetPage()
m_CurrentKeys.ResetContent(); m_CurrentKeys.ResetContent();
CSettingsPageImpl<COptionsShortCutsPage>::ResetPage(); CSettingsPageImpl<COptionsShortCutsPage>::ResetPage();
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
CGeneralOptionsPage::CGeneralOptionsPage(CSettingConfig * SettingsConfig, HWND hParent, const RECT & rcDispay) : CGeneralOptionsPage::CGeneralOptionsPage(CSettingConfig * SettingsConfig, HWND hParent, const RECT & rcDispay) :
@ -77,4 +76,3 @@ void CGeneralOptionsPage::OnBasicMode ( UINT Code, int id, HWND ctl )
CheckBoxChanged(Code, id, ctl); CheckBoxChanged(Code, id, ctl);
m_SettingsConfig->UpdateAdvanced((int)::SendMessage(ctl, BM_GETCHECK, 0, 0) == 0); m_SettingsConfig->UpdateAdvanced((int)::SendMessage(ctl, BM_GETCHECK, 0, 0) == 0);
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
COptionPluginPage::COptionPluginPage(HWND hParent, const RECT & rcDispay) COptionPluginPage::COptionPluginPage(HWND hParent, const RECT & rcDispay)
@ -333,4 +332,3 @@ void COptionPluginPage::HleAudioChanged ( UINT /*Code*/, int id, HWND /*ctl*/ )
break; break;
} }
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
#include "Settings Page.h" #include "Settings Page.h"
CConfigSettingSection::CConfigSettingSection(LPCWSTR PageTitle) : CConfigSettingSection::CConfigSettingSection(LPCWSTR PageTitle) :
@ -41,4 +40,3 @@ CSettingsPage * CConfigSettingSection::GetPage ( int PageNo )
} }
return m_Pages[PageNo]; return m_Pages[PageNo];
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
CModifiedEditBox::CModifiedEditBox(bool bString /* = true */, HWND hWnd /* = NULL */) : CModifiedEditBox::CModifiedEditBox(bool bString /* = true */, HWND hWnd /* = NULL */) :
CEdit(hWnd), CEdit(hWnd),
m_Changed(false), m_Changed(false),
@ -61,9 +60,10 @@ void CModifiedEditBox::SetChanged (bool Changed)
{ {
::SendMessage(m_TextField, WM_SETFONT, (WPARAM)m_BoldFont, 0); ::SendMessage(m_TextField, WM_SETFONT, (WPARAM)m_BoldFont, 0);
::InvalidateRect(m_TextField, NULL, true); ::InvalidateRect(m_TextField, NULL, true);
} }
} else { }
else
{
if (m_OriginalFont) if (m_OriginalFont)
{ {
SendMessage(WM_SETFONT, (WPARAM)m_OriginalFont); SendMessage(WM_SETFONT, (WPARAM)m_OriginalFont);
@ -104,4 +104,3 @@ void CModifiedEditBox::SetTextField (HWND hWnd)
::SendMessage(m_TextField, WM_SETFONT, (WPARAM)m_BoldFont, 0); ::SendMessage(m_TextField, WM_SETFONT, (WPARAM)m_BoldFont, 0);
} }
} }
#endif

View File

@ -10,7 +10,6 @@
****************************************************************************/ ****************************************************************************/
#include "stdafx.h" #include "stdafx.h"
#ifdef WINDOWS_UI
BOOL CPartialGroupBox::Attach(HWND hWnd) BOOL CPartialGroupBox::Attach(HWND hWnd)
{ {
ATLASSUME(m_hWnd == NULL); ATLASSUME(m_hWnd == NULL);
@ -120,4 +119,3 @@ void CPartialGroupBox::OnPaint(HDC /*hDC*/)
dc.DrawTextW(grptext, -1, fontrect, DT_SINGLELINE | DT_LEFT); dc.DrawTextW(grptext, -1, fontrect, DT_SINGLELINE | DT_LEFT);
} }
} }
#endif