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

@ -88,11 +88,24 @@ void TeardownDeviceObjects()
bool Renderer::Init()
{
UpdateActiveConfig();
EmuWindow::SetSize(g_Res[g_ActiveConfig.iWindowedRes][0], g_Res[g_ActiveConfig.iWindowedRes][1]);
int fullScreenRes,
w_temp,
h_temp;
sscanf(g_Config.cInternalRes, "%dx%d", &w_temp, &h_temp);
EmuWindow::SetSize(w_temp, h_temp);
int backbuffer_ms_mode = 0; // g_ActiveConfig.iMultisampleMode;
D3D::Create(g_ActiveConfig.iAdapter, EmuWindow::GetWnd(), g_ActiveConfig.bFullscreen,
g_ActiveConfig.iFSResolution, backbuffer_ms_mode);
sscanf(g_Config.cFSResolution, "%dx%d", &w_temp, &h_temp);
for (fullScreenRes = 0; fullScreenRes < D3D::GetNumAdapters(); fullScreenRes++)
{
if ((D3D::GetAdapter(fullScreenRes).resolutions[fullScreenRes].xres == w_temp) &&
(D3D::GetAdapter(fullScreenRes).resolutions[fullScreenRes].yres == h_temp))
break;
}
D3D::Create(g_ActiveConfig.iAdapter, EmuWindow::GetWnd(), g_ActiveConfig.bFullscreen,
fullScreenRes, backbuffer_ms_mode);
s_backbuffer_width = D3D::GetBackBufferWidth();
s_backbuffer_height = D3D::GetBackBufferHeight();