only load gameini settings if they exist

change D3D to use char[] for resolution settings in ini
warning fixes for FrameAui.cpp

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4273 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99
2009-09-15 08:13:45 +00:00
parent b7d6259405
commit ca7a5b36dc
6 changed files with 66 additions and 48 deletions

View File

@ -292,33 +292,33 @@ void CFrame::OnTab(wxAuiNotebookEvent& event)
MenuPopup.Append(new wxMenuItem(&MenuPopup));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_LOGWINDOW, WindowNameFromId(IDM_LOGWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_LOGWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_LOGWINDOW_PARENT));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_CONSOLEWINDOW, WindowNameFromId(IDM_CONSOLEWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_CONSOLEWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_CONSOLEWINDOW_PARENT));
MenuPopup.Append(new wxMenuItem(&MenuPopup));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_CODEWINDOW, WindowNameFromId(IDM_CODEWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_CODEWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_CODEWINDOW_PARENT));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_REGISTERWINDOW, WindowNameFromId(IDM_REGISTERWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_REGISTERWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_REGISTERWINDOW_PARENT));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_BREAKPOINTWINDOW, WindowNameFromId(IDM_BREAKPOINTWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_BREAKPOINTWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_BREAKPOINTWINDOW_PARENT));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_MEMORYWINDOW, WindowNameFromId(IDM_MEMORYWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_MEMORYWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_MEMORYWINDOW_PARENT));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_JITWINDOW, WindowNameFromId(IDM_JITWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_JITWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_JITWINDOW_PARENT));
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_SOUNDWINDOW, WindowNameFromId(IDM_SOUNDWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_SOUNDWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_SOUNDWINDOW_PARENT));
Item->Enable(false);
Item = new wxMenuItem(&MenuPopup, IDM_FLOAT_VIDEOWINDOW, WindowNameFromId(IDM_VIDEOWINDOW), wxT(""), wxITEM_CHECK);
MenuPopup.Append(Item);
Item->Check(FindWindowById(IDM_VIDEOWINDOW_PARENT));
Item->Check(!!FindWindowById(IDM_VIDEOWINDOW_PARENT));
Item->Enable(false);
// Line up our menu with the cursor

View File

@ -95,9 +95,6 @@ void VideoConfig::Load(const char *ini_file)
iniFile.Get("Hardware", "Adapter", &iAdapter, 0);
if (iAdapter == -1)
iAdapter = 0;
// iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0);
iniFile.Get("Hardware", "VSync", &bVsync, 0);
// iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0);
iniFile.Get("Hardware", "SimpleFB", &bSimpleFB, false);
// Load common settings
@ -111,16 +108,27 @@ void VideoConfig::GameIniLoad(const char *ini_file)
{
IniFile iniFile;
iniFile.Load(ini_file);
iniFile.Get("Video", "ForceFiltering", &bForceFiltering, 0);
iniFile.Get("Video", "MaxAnisotropy", &iMaxAnisotropy, 3); // NOTE - this is x in (1 << x)
iniFile.Get("Video", "EFBCopyDisable", &bEFBCopyDisable, 0);
iniFile.Get("Video", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
iniFile.Get("Video", "EFBToRAMEnable", &bCopyEFBToRAM, 0);
iniFile.Get("Video", "SafeTextureCache", &bSafeTextureCache, false);
iniFile.Get("Video", "MSAA", &iMultisampleMode, 0);
iniFile.Get("Video", "DstAlphaPass", &bDstAlphaPass, false);
iniFile.Get("Video", "UseXFB", &bUseXFB, 0);
iniFile.Get("Video", "ProjectionHack", &iPhackvalue, 0);
if (iniFile.Exists("Video", "ForceFiltering"))
iniFile.Get("Video", "ForceFiltering", &bForceFiltering, 0);
if (iniFile.Exists("Video", "MaxAnisotropy"))
iniFile.Get("Video", "MaxAnisotropy", &iMaxAnisotropy, 3); // NOTE - this is x in (1 << x)
if (iniFile.Exists("Video", "EFBCopyDisable"))
iniFile.Get("Video", "EFBCopyDisable", &bEFBCopyDisable, 0);
if (iniFile.Exists("Video", "EFBCopyDisableHotKey"))
iniFile.Get("Video", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
if (iniFile.Exists("Video", "EFBToRAMEnable"))
iniFile.Get("Video", "EFBToRAMEnable", &bCopyEFBToRAM, 0);
if (iniFile.Exists("Video", "SafeTextureCache"))
iniFile.Get("Video", "SafeTextureCache", &bSafeTextureCache, false);
if (iniFile.Exists("Video", "MSAA"))
iniFile.Get("Video", "MSAA", &iMultisampleMode, 0);
if (iniFile.Exists("Video", "DstAlphaPass"))
iniFile.Get("Video", "DstAlphaPass", &bDstAlphaPass, false);
if (iniFile.Exists("Video", "UseXFB"))
iniFile.Get("Video", "UseXFB", &bUseXFB, 0);
if (iniFile.Exists("Video", "ProjectionHack"))
iniFile.Get("Video", "ProjectionHack", &iPhackvalue, 0);
}
void VideoConfig::Save(const char *ini_file)
@ -174,9 +182,6 @@ void VideoConfig::Save(const char *ini_file)
iniFile.Set("Hacks", "ProjectionHack", iPhackvalue);
iniFile.Set("Hardware", "Adapter", iAdapter);
// iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
iniFile.Set("Hardware", "VSync", bVsync);
// iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
iniFile.Set("Hardware", "SimpleFB", bSimpleFB);
iniFile.Save(ini_file);

View File

@ -123,10 +123,6 @@ struct VideoConfig
// D3D only config, mostly to be merged into the above
int iAdapter;
int iWindowedRes;
int iFSResolution;
bool bVsync;
// With this enabled, the plugin renders directly to the backbuffer. Many features are
// disabled but it might be faster on really old GPUs.