mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
Add "Auto Aspect Ratio" to both graphics plugins. It's the new default, so you can forget about switching aspect manually from now on. In the Auto mode, aspect ratio is automatically set depending on whether it's a Wii or GC game, and whether the global Wii Widescreen setting has been set. There is still the possibility to override, which can be useful for the very few GC games that do support widescreen.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4828 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -29,6 +29,13 @@
|
||||
// TODO: remove if/when ini files use unicode
|
||||
#define ComboBox_GetTextA(hwndCtl, lpch, cchMax) GetWindowTextA((hwndCtl), (lpch), (cchMax))
|
||||
|
||||
const char *aspect_ratio_names[4] = {
|
||||
"Auto",
|
||||
"Force 16:9 Widescreen",
|
||||
"Force 4:3 Standard",
|
||||
"Stretch to Window",
|
||||
};
|
||||
|
||||
struct TabDirect3D : public W32Util::Tab
|
||||
{
|
||||
void Init(HWND hDlg)
|
||||
@ -39,7 +46,7 @@ struct TabDirect3D : public W32Util::Tab
|
||||
{
|
||||
const D3D::Adapter &adapter = D3D::GetAdapter(i);
|
||||
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, adapter.ident.Description, -1, tempwstr, 2000);
|
||||
ComboBox_AddString(GetDlgItem(hDlg,IDC_ADAPTER),tempwstr);
|
||||
ComboBox_AddString(GetDlgItem(hDlg, IDC_ADAPTER),tempwstr);
|
||||
}
|
||||
|
||||
const D3D::Adapter &adapter = D3D::GetAdapter(g_Config.iAdapter);
|
||||
@ -57,25 +64,34 @@ struct TabDirect3D : public W32Util::Tab
|
||||
ComboBox_Enable(GetDlgItem(hDlg, IDC_ANTIALIASMODE), FALSE);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, aspect_ratio_names[i], -1, tempwstr, 2000);
|
||||
ComboBox_AddString(GetDlgItem(hDlg, IDC_ASPECTRATIO), tempwstr);
|
||||
}
|
||||
ComboBox_SetCurSel(GetDlgItem(hDlg, IDC_ASPECTRATIO), g_Config.iAspectRatio);
|
||||
|
||||
for (int i = 0; i < (int)adapter.resolutions.size(); i++)
|
||||
{
|
||||
const D3D::Resolution &r = adapter.resolutions[i];
|
||||
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, r.name, -1, tempwstr, 2000);
|
||||
ComboBox_AddString(GetDlgItem(hDlg,IDC_RESOLUTION), tempwstr);
|
||||
ComboBox_AddString(GetDlgItem(hDlg,IDC_RESOLUTIONWINDOWED),tempwstr);
|
||||
ComboBox_AddString(GetDlgItem(hDlg, IDC_RESOLUTION), tempwstr);
|
||||
ComboBox_AddString(GetDlgItem(hDlg, IDC_RESOLUTIONWINDOWED),tempwstr);
|
||||
}
|
||||
|
||||
for (int i = 0; i <16; i++) tempwstr[i] = g_Config.cFSResolution[i];
|
||||
for (int i = 0; i < 16; i++) {
|
||||
tempwstr[i] = g_Config.cFSResolution[i];
|
||||
}
|
||||
ComboBox_SelectString(GetDlgItem(hDlg,IDC_RESOLUTION), -1, tempwstr);
|
||||
|
||||
for (int i = 0; i < 16; i++) tempwstr[i] = g_Config.cInternalRes[i];
|
||||
for (int i = 0; i < 16; i++) {
|
||||
tempwstr[i] = g_Config.cInternalRes[i];
|
||||
}
|
||||
ComboBox_SelectString(GetDlgItem(hDlg,IDC_RESOLUTIONWINDOWED), -1, tempwstr);
|
||||
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_FULLSCREENENABLE), g_Config.bFullscreen);
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_VSYNC), g_Config.bVSync);
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_RENDER_TO_MAINWINDOW), g_Config.RenderToMainframe);
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_ASPECT_16_9), g_Config.bKeepAR169);
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_ASPECT_4_3), g_Config.bKeepAR43);
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK), g_Config.bWidescreenHack);
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE), g_Config.bSafeTextureCache);
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_EFB_ACCESS_ENABLE), g_Config.bEFBAccessEnable);
|
||||
@ -86,15 +102,8 @@ struct TabDirect3D : public W32Util::Tab
|
||||
{
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_ASPECT_4_3:
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_ASPECT_16_9), FALSE);
|
||||
g_Config.bKeepAR43 = Button_GetCheck(GetDlgItem(hDlg, IDC_ASPECT_4_3)) ? true : false;
|
||||
g_Config.bKeepAR169 = false;
|
||||
break;
|
||||
case IDC_ASPECT_16_9:
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_ASPECT_4_3), FALSE);
|
||||
g_Config.bKeepAR169 = Button_GetCheck(GetDlgItem(hDlg, IDC_ASPECT_16_9)) ? true : false;
|
||||
g_Config.bKeepAR43 = false;
|
||||
case IDC_ASPECTRATIO:
|
||||
g_Config.iAspectRatio = ComboBox_GetCurSel(GetDlgItem(hDlg, IDC_ASPECTRATIO));
|
||||
break;
|
||||
case IDC_WIDESCREEN_HACK:
|
||||
g_Config.bWidescreenHack = Button_GetCheck(GetDlgItem(hDlg, IDC_WIDESCREEN_HACK)) ? true : false;
|
||||
|
Reference in New Issue
Block a user