fixed(ogl): resolution detection on widnows, configdlg.cpp compile problems on non-windows, and fixed the recently broked texfmtoverlay ... >_<

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@145 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2008-08-07 02:49:56 +00:00
parent fb8c0ed71d
commit f46c64c02f
4 changed files with 32 additions and 45 deletions

View File

@ -93,20 +93,12 @@ void ConfigDialog::CreateGUIControls()
wxStaticText *FSText = new wxStaticText(m_PageVideo, ID_FSTEXT, wxT("Fullscreen video mode:"), wxDefaultPosition, wxDefaultSize, 0); wxStaticText *FSText = new wxStaticText(m_PageVideo, ID_FSTEXT, wxT("Fullscreen video mode:"), wxDefaultPosition, wxDefaultSize, 0);
wxArrayString arrayStringFor_FullscreenCB; wxArrayString arrayStringFor_FullscreenCB;
m_FullscreenCB = new wxComboBox(m_PageVideo, ID_FULLSCREENCB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenCB, 0, wxDefaultValidator); m_FullscreenCB = new wxComboBox(m_PageVideo, ID_FULLSCREENCB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_FullscreenCB, 0, wxDefaultValidator);
#ifdef MACOSX
m_FullscreenCB->SetValue(wxString::FromAscii(g_Config.iFSResolution)); m_FullscreenCB->SetValue(wxString::FromAscii(g_Config.iFSResolution));
#else
m_FullscreenCB->SetValue(g_Config.iFSResolution);
#endif
wxStaticText *WMText = new wxStaticText(m_PageVideo, ID_WMTEXT, wxT("Windowed resolution:"), wxDefaultPosition, wxDefaultSize, 0); wxStaticText *WMText = new wxStaticText(m_PageVideo, ID_WMTEXT, wxT("Windowed resolution:"), wxDefaultPosition, wxDefaultSize, 0);
wxArrayString arrayStringFor_WindowResolutionCB; wxArrayString arrayStringFor_WindowResolutionCB;
m_WindowResolutionCB = new wxComboBox(m_PageVideo, ID_WINDOWRESOLUTIONCB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_WindowResolutionCB, 0, wxDefaultValidator); m_WindowResolutionCB = new wxComboBox(m_PageVideo, ID_WINDOWRESOLUTIONCB, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_WindowResolutionCB, 0, wxDefaultValidator);
#ifdef MACOSX
m_WindowResolutionCB->SetValue(wxString::FromAscii(g_Config.iWindowedRes)); m_WindowResolutionCB->SetValue(wxString::FromAscii(g_Config.iWindowedRes));
#else
m_WindowResolutionCB->SetValue(g_Config.iWindowedRes);
#endif
//page2 //page2
m_ForceFiltering = new wxCheckBox(m_PageEnhancements, ID_FORCEFILTERING, wxT("Force bi/trilinear filtering (May cause small glitches)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_ForceFiltering = new wxCheckBox(m_PageEnhancements, ID_FORCEFILTERING, wxT("Force bi/trilinear filtering (May cause small glitches)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@ -291,6 +283,7 @@ void ConfigDialog::DumpTexturesChange(wxCommandEvent& event)
void ConfigDialog::TexturePathChange(wxFileDirPickerEvent& event) void ConfigDialog::TexturePathChange(wxFileDirPickerEvent& event)
{ {
//note: if a user inputs an incorrect path, this event wil not be fired. //note: if a user inputs an incorrect path(by typing, not by choosing from
// the combobox, this event wil not be fired.
strcpy(g_Config.texDumpPath,event.GetPath().mb_str()); strcpy(g_Config.texDumpPath,event.GetPath().mb_str());
} }

View File

@ -154,43 +154,39 @@ struct Config
void Load(); void Load();
void Save(); void Save();
int iAdapter; //video
char iFSResolution[16];
int iMultisampleMode;
int iPostprocessEffect;
int iCompileDLsLevel;
bool renderToMainframe;
int iLog; // CONF_ bits
bool bFullscreen; bool bFullscreen;
bool bWireFrame; bool renderToMainframe;
bool bOverlayStats; char iFSResolution[16];
bool bDumpTextures; char iWindowedRes[16];
bool bOldCard;
bool bShowShaderErrors;
//enhancements
bool bForceFiltering; bool bForceFiltering;
bool bForceMaxAniso; bool bForceMaxAniso;
bool bPreUpscale;
int iPreUpscaleFilter;
bool bTruform;
int iTruformLevel;
char iWindowedRes[16];
int aa; // anti-aliasing level
char psProfile[16];
char vsProfile[16];
bool bTexFmtOverlayEnable; bool bTexFmtOverlayEnable;
bool bTexFmtOverlayCenter; bool bTexFmtOverlayCenter;
bool bOverlayStats;
bool bDumpTextures;
char texDumpPath[280];
int iSaveTargetId; int iSaveTargetId;
char texDumpPath[280]; //currently unused:
int aa; // anti-aliasing level
int iLog; // CONF_ bits
int iAdapter;
int iMultisampleMode;
char psProfile[16];
char vsProfile[16];
int iPostprocessEffect;
int iCompileDLsLevel;
bool bPreUpscale;
int iPreUpscaleFilter;
bool bTruform;
int iTruformLevel;
bool bOldCard;
bool bWireFrame;
bool bShowShaderErrors;
}; };
extern Config g_Config; extern Config g_Config;

View File

@ -87,6 +87,7 @@ void TextureMngr::Init()
{ {
temp = (u8*)AllocateMemoryPages(TEMP_SIZE); temp = (u8*)AllocateMemoryPages(TEMP_SIZE);
nTex2DEnabled = nTexRECTEnabled = 0; nTex2DEnabled = nTexRECTEnabled = 0;
TexDecoder_SetTexFmtOverlayOptions(g_Config.bTexFmtOverlayEnable,g_Config.bTexFmtOverlayCenter);
} }
void TextureMngr::Invalidate() void TextureMngr::Invalidate()
@ -95,6 +96,7 @@ void TextureMngr::Invalidate()
for (;iter!=textures.end();iter++) for (;iter!=textures.end();iter++)
iter->second.Destroy(); iter->second.Destroy();
textures.clear(); textures.clear();
TexDecoder_SetTexFmtOverlayOptions(g_Config.bTexFmtOverlayEnable,g_Config.bTexFmtOverlayCenter);
} }
void TextureMngr::Shutdown() void TextureMngr::Shutdown()

View File

@ -70,16 +70,13 @@ void DllConfig(HWND _hParent)
DWORD iModeNum = 0; DWORD iModeNum = 0;
DEVMODE dmi; DEVMODE dmi;
int x = 0, y = 0;
ZeroMemory(&dmi, sizeof(dmi)); ZeroMemory(&dmi, sizeof(dmi));
dmi.dmSize = sizeof(dmi); dmi.dmSize = sizeof(dmi);
int x = 0, y = 0;
while(EnumDisplaySettings(NULL, iModeNum++, &dmi) != 0) while(EnumDisplaySettings(NULL, iModeNum++, &dmi) != 0)
{ {
//TODO check against all older resolutions, not just the previous if((x != dmi.dmPelsWidth && y != dmi.dmPelsHeight) && (dmi.dmPelsWidth > x))
if(x != dmi.dmPelsWidth && y != dmi.dmPelsHeight && dmi.dmBitsPerPel == 32)
{ {
char szBuffer[100]; char szBuffer[100];
sprintf(szBuffer,"%dx%d", dmi.dmPelsWidth, dmi.dmPelsHeight); sprintf(szBuffer,"%dx%d", dmi.dmPelsWidth, dmi.dmPelsHeight);
@ -90,7 +87,6 @@ void DllConfig(HWND _hParent)
} }
ZeroMemory(&dmi, sizeof(dmi)); ZeroMemory(&dmi, sizeof(dmi));
} }
frame.ShowModal(); frame.ShowModal();
win.SetHWND(0); win.SetHWND(0);